Control.Monad.Trans.Adjoint

adjunctions-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
Language | Haskell98

Control.Monad.Trans.Adjoint

Description

# Documentation

type Adjoint f g = AdjointT f g Identity

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

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

newtype AdjointT f g m a

Constructors

AdjointT |
Fields runAdjointT :: g (m (f a))

Instances

(Adjunction f g, Traversable f) => MonadTrans (AdjointT f g) | Exploiting this instance requires that we have the missing Traversables for Identity, (,)e and IdentityT
(Adjunction f g, Monad m) => Monad (AdjointT f g m) |
(Adjunction f g, Monad m) => Functor (AdjointT f g m) |
(Adjunction f g, Monad m) => Applicative (AdjointT f g m) |