HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduletransformers-0.6.1.2Haskell2010

Control.Monad.Signatures

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

  • 4 types
typetype CallCC (m :: Type -> Type) 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.

typetype Catch e (m :: k -> Type) (a :: k) = 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.