Legend:
Library
Module
Module type
Parameter
Class
Class type
Haskell-style state transformers.
State transformers generalise state monads. They attach onto an existing monad, and allow the stateful computations to return and handle values inside that monad. For example, transforming On_error provides stateful, potentially-failing computations.
We provide two signatures for state transformers: one corresponding to the situation where the state type is fixed at the module level (S), and one leaving the state type as part of the monad type (S2). Both have corresponding make functors.
We also provide a functor To_S for fixing the state type in an arity-2 monad after the fact.