adjunctions-4.4.3: Adjunctions and representable functors

Copyright | (C) 2011-2013 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | MPTCs, fundeps
Safe Haskell | Safe-Inferred
Language | Haskell2010

Control.Monad.Trans.Adjoint

Description

# Documentation

type Adjoint (f :: Type -> Type) (g :: Type -> Type) = AdjointT f g Identity Source #

runAdjoint :: Functor g => Adjoint f g a -> g (f a) Source #

adjoint :: Functor g => g (f a) -> Adjoint f g a Source #

newtype AdjointT (f :: Type -> Type) (g :: Type -> Type) (m :: Type -> Type) a Source #

Constructors

AdjointT |

Fields

- runAdjointT :: g (m (f a))

#### Instances

Instances details

(Adjunction f g, Traversable f) => MonadTrans (AdjointT f g) Source # | Exploiting this instance requires that we have the missing Traversables for Identity, (,)e and IdentityT
Instance details Defined in Control.Monad.Trans.Adjoint Methods lift :: Monad m => m a -> AdjointT f g m a Source #
(Adjunction f g, Monad m) => Applicative (AdjointT f g m) Source # |

Instance details

Defined in Control.Monad.Trans.Adjoint

Methods

pure :: a -> AdjointT f g m a Source #

(<*>) :: AdjointT f g m (a -> b) -> AdjointT f g m a -> AdjointT f g m b Source #

liftA2 :: (a -> b -> c) -> AdjointT f g m a -> AdjointT f g m b -> AdjointT f g m c Source #

(*>) :: AdjointT f g m a -> AdjointT f g m b -> AdjointT f g m b Source #

(<*) :: AdjointT f g m a -> AdjointT f g m b -> AdjointT f g m a Source #

(Adjunction f g, Monad m) => Functor (AdjointT f g m) Source # |
Instance details Defined in Control.Monad.Trans.Adjoint Methods fmap :: (a -> b) -> AdjointT f g m a -> AdjointT f g m b Source # (<$) :: a -> AdjointT f g m b -> AdjointT f g m a Source #
(Adjunction f g, Monad m) => Monad (AdjointT f g m) Source # |
Instance details Defined in Control.Monad.Trans.Adjoint Methods (>>=) :: AdjointT f g m a -> (a -> AdjointT f g m b) -> AdjointT f g m b Source # (>>) :: AdjointT f g m a -> AdjointT f g m b -> AdjointT f g m b Source # return :: a -> AdjointT f g m a Source #