transformers-lift-0.1.0.1: Ad-hoc type classes for lifting

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.Lift.CallCC

Description

Lifting the callCC operation.

Synopsis

Documentation

class MonadTrans t => LiftCallCC t where Source

The class of monad transformers capable of lifting callCC.

Minimal complete definition

liftCallCC

Methods

liftCallCC :: Monad m => CallCC m (StT t a) (StT t b) -> CallCC (t m) a b Source

Lift the callCC operation. Should satisfy the uniformity property

liftCallCC' :: Monad m => CallCC m (StT t a) (StT t b) -> CallCC (t m) a b Source

Lift the callCC operation. This is an alternative version of liftCallCC included for historical reasons. It has a different lifting behavior for the StateT and RWST monad transformers. Matches what mtl does but doesn't satisfy the uniformity property.

type CallCC m a b = ((a -> m b) -> m a) -> m a

Signature of the callCC operation, introduced in Control.Monad.Trans.Cont.

defaultLiftCallCC Source

Arguments

:: (Monad m, LiftCallCC n) 
=> (forall x. n m x -> t m x)

Monad constructor

-> (forall o x. t o x -> n o x)

Monad deconstructor

-> CallCC m (StT n a) (StT n b) 
-> CallCC (t m) a b 

Default definition for the liftCallCC method.

defaultLiftCallCC' Source

Arguments

:: (Monad m, LiftCallCC n) 
=> (forall x. n m x -> t m x)

Monad constructor

-> (forall o x. t o x -> n o x)

Monad deconstructor

-> CallCC m (StT n a) (StT n b) 
-> CallCC (t m) a b 

Default definition for the liftCallCC' method.