adjunctions-2.0.0.1: Adjunctions

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

Control.Monad.Trans.Conts

Contents

Description

 Cont r ~ Contravariant.Adjoint (Op r) (Op r)
 Conts r ~ Contravariant.AdjointT (Op r) (Op r)
 ContsT r w m ~ Contravariant.AdjointT (Op (m r)) (Op (m r)) w

Synopsis

Continuation passing style

cont :: ((a -> r) -> r) -> Cont r aSource

runCont :: Cont r a -> (a -> r) -> rSource

Multiple-continuation passing style

type Conts r w = ContsT r w IdentitySource

runConts :: Functor w => Conts r w a -> w (a -> r) -> rSource

conts :: Functor w => (w (a -> r) -> r) -> Conts r w aSource

Multiple-continuation passing style transformer

newtype ContsT r w m a Source

Constructors

ContsT 

Fields

runContsT :: w (a -> m r) -> m r
 

Instances

Comonad w => MonadTrans (ContsT r w) 
Comonad w => Monad (ContsT r w m) 
Functor w => Functor (ContsT r w m) 
Comonad w => Applicative (ContsT r w m) 
Comonad w => Apply (ContsT r w m) 

callCC :: Comonad w => ((a -> ContsT r w m b) -> ContsT r w m a) -> ContsT r w m aSource