MonadPlus transformers. There are also
MonadFix transformes, see the corresponding modules.
Note that each
MonadPlus transformer is also a
MonadP m is actually a free
MonadPlus generated by
MonadP is a monad itself (on the
(* -> *) category), as usually happens with free structures.
You shoudn't (and probably can't) use *anything* except for
, defined in this very module, as
If you define
instance TransP T where transPInst = instP, then you would also need to define
instance MonadPlus m => MonadPlus (T m) somewhere in your code.
MonadPlus is nothing but an algebra over the
instP provides it's structure map.
Sometimes we need an
instance MonadPlus T, while everything we've got is
InstP MonadP T. In this case,
mzero' serves as a