Monad transformers. There are also
MonadFix transformes, see the corresponding modules.
MonadM m is actually a free monad generated by
MonadM is a monad itself (on the
(* -> *) category), as usually happens with free structures.
A composable monad transformer.
You shoudn't (and probably can't) use *anything* except for
, defined in this very module, as
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.
A monad is nothing but an algebra over the
instM provides it's structure map.
Sometimes we need an
instance Monad T, while everything we've got is
Inst MonadP T. In this case,
return' serves as a