adjunctions-0.4.0: Adjunctions

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

Control.Monad.Contra.Adjoint

Description

Use a contravariant adjunction to Hask^op to build a Comonad to Monad transformer.

Documentation

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

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

newtype AdjointT f g w a Source

Constructors

AdjointT 

Fields

runAdjointT :: g (w (f a))
 

Instances

(Adjunction f g, Comonad w) => Monad (AdjointT f g w) 
(Adjunction f g, Functor w) => Functor (AdjointT f g w) 
(Adjunction f g, Comonad w) => Applicative (AdjointT f g w)