Module Monads.Std.Monad.Writer

module Writer: sig .. end
The Writer monad.

The writer monad denotes a simple effectful computations. The environment is represented with some type that should form the monoid. Effects are accumulated using the Monoid.plus operation. The Writer monad is also known a the Logger monad.


module type S = sig .. end
type ('a, 'b) writer 
module T1 (T : Std.Monoid.S)  (M : Std.Monad.Monad) : sig .. end
module Make (T : Std.Monoid.S)  (M : Std.Monad.Monad) : S  with type 'a m := 'a T1(T)(M).m
             and type 'a t := 'a T1(T)(M).t
             and type 'a e := 'a T1(T)(M).e
             and type state := T1(T)(M).state
Make(Sum)(M) constructs a reader that uses Sum.t type as a state accumulator and composes the Writer with the monad M.