@hackage MonadCompose0.8.3.0
Methods for composing monads.
Installation
Dependencies (13)
Dependents (1)
@hackage/acme-everything
Methods for composing monads.
The IO monad transformer solves the problem of combining two IO-performing monads, so that neither one needs to provide a MonadIO interface and both can be transformed separately.
Most known monads have a distributive law. The Distributive module implements distributivity for monad transformers.
A monad transformer can transform another monad, but if you have two monads both lacking a transformer, there is little you can do in general. However, you can compose them in a coproduct construction. The PlusMonad module implements a similar plan, but differs from coproducts in that it doesn't compress together contiguous uses of a monad.