Idris2Doc : Control.Monad.Writer.Interface

Control.Monad.Writer.Interface

MonadWriter : Type -> (Type -> Type) -> Type
MonadWriter interface

tell is like tell on the MUD's it shouts to monad
what you want to be heard. The monad carries this 'packet'
upwards, merging it if needed (hence the Monoid requirement).

listen listens to a monad acting, and returns what the monad "said".

pass lets you provide a writer transformer which changes internals of
the written object.
Parameters: w, m
Constraints: Monoid w, Monad m
Methods:
writer : _ -> ma
`writer (a,w)` embeds a simple writer action.
tell : w -> m _
`tell w` is an action that produces the output `w`.
listen : ma -> m _
`listen m` is an action that executes the action `m` and adds
its output to the value of the computation.
pass : m _ -> ma
`pass m` is an action that executes the action `m`, which
returns a value and a function, and returns the value, applying
the function to the output.

Implementations:
(Monoidw, Monadm) => MonadWriterw (WriterTwm)
(Monoidw, Monadm) => MonadWriterw (RWSTrwsm)
MonadWriterwm => MonadWriterw (EitherTem)
MonadWriterwm => MonadWriterw (MaybeTm)
MonadWriterwm => MonadWriterw (ReaderTrm)
MonadWriterwm => MonadWriterw (StateTsm)
censor : MonadWriterwm => (w -> w) -> ma -> ma
`censor f m` is an action that executes the action `m` and
applies the function `f` to its output, leaving the return value
unchanged.
listen : MonadWriterwm => ma -> m (a, w)
`listen m` is an action that executes the action `m` and adds
its output to the value of the computation.
listens : MonadWriterwm => (w -> b) -> ma -> m (a, b)
`listens f m` is an action that executes the action `m` and adds
the result of applying @f@ to the output to the value of the computation.
pass : MonadWriterwm => m (a, w -> w) -> ma
`pass m` is an action that executes the action `m`, which
returns a value and a function, and returns the value, applying
the function to the output.
tell : MonadWriterwm => w -> mUnit
`tell w` is an action that produces the output `w`.
writer : MonadWriterwm => (a, w) -> ma
`writer (a,w)` embeds a simple writer action.