adjunctions-4.4.2: 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-Inferred
Language Haskell2010

Control.Monad.Trans.Conts

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 a Source #

runCont :: Cont r a -> (a -> r) -> r Source #

Multiple-continuation passing style

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

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

Multiple-continuation passing style transformer

newtype ContsT r w m a Source #

Constructors

ContsT

Fields

Instances

Instances details
Comonad w => MonadTrans ( ContsT r w) Source #
Instance details

Defined in Control.Monad.Trans.Conts

Methods

lift :: Monad m => m a -> ContsT r w m a Source #

Comonad w => Monad ( ContsT r w m) Source #
Instance details

Defined in Control.Monad.Trans.Conts

Methods

(>>=) :: ContsT r w m a -> (a -> ContsT r w m b) -> ContsT r w m b Source #

(>>) :: ContsT r w m a -> ContsT r w m b -> ContsT r w m b Source #

return :: a -> ContsT r w m a Source #

Functor w => Functor ( ContsT r w m) Source #
Instance details

Defined in Control.Monad.Trans.Conts

Methods

fmap :: (a -> b) -> ContsT r w m a -> ContsT r w m b Source #

(<$) :: a -> ContsT r w m b -> ContsT r w m a Source #

Comonad w => Applicative ( ContsT r w m) Source #
Instance details

Defined in Control.Monad.Trans.Conts

Methods

pure :: a -> ContsT r w m a Source #

(<*>) :: ContsT r w m (a -> b) -> ContsT r w m a -> ContsT r w m b Source #

liftA2 :: (a -> b -> c) -> ContsT r w m a -> ContsT r w m b -> ContsT r w m c Source #

(*>) :: ContsT r w m a -> ContsT r w m b -> ContsT r w m b Source #

(<*) :: ContsT r w m a -> ContsT r w m b -> ContsT r w m a Source #

Comonad w => Apply ( ContsT r w m) Source #
Instance details

Defined in Control.Monad.Trans.Conts

Methods

(<.>) :: ContsT r w m (a -> b) -> ContsT r w m a -> ContsT r w m b Source #

(.>) :: ContsT r w m a -> ContsT r w m b -> ContsT r w m b Source #

(<.) :: ContsT r w m a -> ContsT r w m b -> ContsT r w m a Source #

liftF2 :: (a -> b -> c) -> ContsT r w m a -> ContsT r w m b -> ContsT r w m c Source #

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