Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Lifting the listen
operation.
Synopsis
- class MonadTrans t => LiftListen t where
- liftListen :: Monad m => Listen w m (StT t a) -> Listen w (t m) a
- type Listen w (m :: Type -> Type) a = m a -> m (a, w)
- defaultLiftListen :: (Monad m, LiftListen n) => (forall x. n m x -> t m x) -> (forall o x. t o x -> n o x) -> Listen w m (StT n a) -> Listen w (t m) a
- module Control.Monad.Trans.Class
Documentation
class MonadTrans t => LiftListen t where Source #
The class of monad transformers capable of lifting listen
.
liftListen :: Monad m => Listen w m (StT t a) -> Listen w (t m) a Source #
Lift the listen
operation.
Should satisfy the uniformity property
lift
.liftListen
=liftListen
.lift
Instances
type Listen w (m :: Type -> Type) 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
:: (Monad m, LiftListen n) | |
=> (forall x. n m x -> t m x) | Monad constructor |
-> (forall o x. t o x -> n o x) | Monad deconstructor |
-> Listen w m (StT n a) | |
-> Listen w (t m) a |
Default definition for the liftListen
method.
module Control.Monad.Trans.Class