Community
Modules 24

Control.Monad.Signatures

experimental

Signatures for monad operations that require specialized lifting. Each signature has a uniformity property that the lifting should satisfy.

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

Signature of the callCC operation, introduced in Control.Monad.Trans.Cont. Any lifting function liftCallCC should satisfy

lift (f k) = f' (lift . k) => lift (cf f) = liftCallCC cf f'

This implies that on entry to the continuation any outer monad transformer effect inside callCC will have been rolled back.

type Catch e m a = m a -> (e -> m a) -> m a

Signature of the catchE operation, introduced in Control.Monad.Trans.Except. Any lifting function liftCatch should satisfy

lift (cf m h) = liftCatch cf (lift m) (lift . h)

This implies that on entry to the handler function any outer monad transformer effect inside catchE will have been rolled back.

type Listen w m a = m a -> m (a, w)

Signature of the listen operation, introduced in Control.Monad.Trans.Writer. Any lifting function liftListen should satisfy

lift . liftListen = liftListen . lift

type Pass w m a = m (a, w -> w) -> m a

Signature of the pass operation, introduced in Control.Monad.Trans.Writer. Any lifting function liftPass should satisfy

lift . liftPass = liftPass . lift

Maintainer
R.Paterson@city.ac.uk
Portability
portable
Copyright
(c) Ross Paterson 2012
License
BSD-style (see the file LICENSE)
Build record and source files

Community contribution. The service has not verified this documentation.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-858b1951-web-1

Metadata snapshot: ac77ab7d2b1e88487eeab41661abedb7bfb8bc846deb92e7874c08d166bff65d

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.