Monad.Trans
Monad Transformer Interface.
A monad transformer is a monad composition operator. There is not notion of a generic transformer, that takes two arbitrary monads and compose them, but every single monad should provide its own transformer. This module provides three interfaces of the transfomers:
A composition of two monads denoted as module M =
Outer.Make(Inner)
can is a new monad M
that has properties of both Outer
and Inner
(you visualize this composition as a russian doll). All transfomers provide a lift
function that lifts computations in the inner monad _ m
to the resultint monad _ t
. The run
function will actually run the computation and result in a value of type _ e
that each monad transfomer defines differently.