Idris2Doc : Control.Monad.Writer.Interface

Control.Monad.Writer.Interface

Definitions

interfaceMonadWriter : 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 : (a, w) ->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 (a, w)
  `listen m` is an action that executes the action `m` and adds
its output to the value of the computation.
pass : 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.

Implementations:
(Monoidw, Monadm) =>MonadWriterw (WriterTwm)
(Monoidw, Monadm) =>MonadWriterw (RWSTrwsm)
MonadWriterwm=>MonadWriterw (EitherTem)
MonadWriterwm=>MonadWriterw (MaybeTm)
MonadWriterwm=>MonadWriterw (ReaderTrm)
MonadWriterwm=>MonadWriterw (StateTsm)
writer : MonadWriterwm=> (a, w) ->ma
  `writer (a,w)` embeds a simple writer action.

Totality: total
Visibility: public export
tell : MonadWriterwm=>w->m ()
  `tell w` is an action that produces the output `w`.

Totality: total
Visibility: public export
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.

Totality: total
Visibility: public export
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.

Totality: total
Visibility: public export
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.

Totality: total
Visibility: public export
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.

Totality: total
Visibility: public export