adjunctions-4.4: Adjunctions and representable functors
Copyright(C) 2011-2013 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
PortabilityMPTCs, fundeps
Safe HaskellSafe-Inferred
LanguageHaskell98

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

Instances

Instances details
(Adjunction f g, Traversable f) => MonadTrans (AdjointT f g) #

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 #

(Adjunction f g, Monad m) => Monad (AdjointT f g m) # 
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 #

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

return :: a -> AdjointT f g m a #

(Adjunction f g, Monad m) => Functor (AdjointT f g m) # 
Instance details

Defined in Control.Monad.Trans.Adjoint

Methods

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

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

(Adjunction f g, Monad m) => Applicative (AdjointT f g m) # 
Instance details

Defined in Control.Monad.Trans.Adjoint

Methods

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

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

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

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

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