adjunctions-4.2: Adjunctions and representable functors

PortabilityMPTCs, fundeps
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellTrustworthy

Control.Monad.Trans.Adjoint

Description

 

Documentation

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

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

newtype AdjointT f g m a Source

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)