Monad
transformers. There are also MonadPlus
and MonadFix
transformes, see the corresponding modules.
Documentation
MonadM m
is actually a free monad generated by m
. MonadM
is a monad itself (on the (* -> *)
category), as usually happens with free structures.
class MonadTrans t => TransM t whereSource
A composable monad transformer.
transMInst :: Monad m => Inst MonadM (t m)Source
You shoudn't (and probably can't) use *anything* except for
, defined in this very module, as instM
transMInst
.
If you define instance TransM T where transMInst = instM
, then you would also need to define instance Monad m => Monad (T m)
somewhere in your code.
instM :: Monad m => Inst MonadM mSource
A monad is nothing but an algebra over the MonadM
monad. instM
provides it's structure map.