Idris2Doc : Control.Monad.RWS.CPS

Control.Monad.RWS.CPS

Note: The difference to a 'strict' RWST implementation is
that accumulation of values does not happen in the
Applicative and Monad instances but when invoking `Writer`-specific
functions like `writer` or `listen`.

Definitions

recordRWST : Type->Type->Type-> (Type->Type) ->Type->Type
  A monad transformer extending an inner monad `m` with the ability to read
an environment of type `r`, collect an output of type `w` and update a
state of type `s`.

This is equivalent to `ReaderT r (WriterT w (StateT s m)) a`, but fuses the
three layers.

Totality: total
Visibility: public export
Constructor: 
MkRWST : (r->s->w->m (a, (s, w))) ->RWSTrwsma

Projection: 
.unRWST : RWSTrwsma->r->s->w->m (a, (s, w))

Hints:
(Monadm, Alternativem) =>Alternative (RWSTrwsm)
Monadm=>Applicative (RWSTrwsm)
Functorm=>Functor (RWSTrwsm)
HasIOm=>HasIO (RWSTrwsm)
Monadm=>Monad (RWSTrwsm)
MonadErrorem=>MonadErrore (RWSTrwsm)
(Monoidw, Monadm) =>MonadRWSrws (RWSTrwsm)
Monadm=>MonadReaderr (RWSTrwsm)
Monadm=>MonadStates (RWSTrwsm)
MonadTrans (RWSTrws)
(Monoidw, Monadm) =>MonadWriterw (RWSTrwsm)
.unRWST : RWSTrwsma->r->s->w->m (a, (s, w))
Totality: total
Visibility: public export
unRWST : RWSTrwsma->r->s->w->m (a, (s, w))
Totality: total
Visibility: public export
runRWST : Monoidw=>r->s->RWSTrwsma->m (a, (s, w))
  Unwrap an RWST computation as a function.

This is the inverse of `rwsT`.

Totality: total
Visibility: public export
rwsT : Semigroupw=>Functorm=> (r->s->m (a, (s, w))) ->RWSTrwsma
  Construct an RWST computation from a function.

This is the inverse of `runRWST`.

Totality: total
Visibility: public export
evalRWST : Monoidw=>Functorm=>r->s->RWSTrwsma->m (a, w)
  Evaluate a computation with the given initial state and environment,
returning the final value and output, discarding the final state.

Totality: total
Visibility: public export
execRWST : Monoidw=>Functorm=>r->s->RWSTrwsma->m (s, w)
  Evaluate a computation with the given initial state and environment,
returning the final state and output, discarding the final value.

Totality: total
Visibility: public export
mapRWST : (Functorn, (Monoidw, Semigroupw')) => (m (a, (s, w)) ->n (b, (s, w'))) ->RWSTrwsma->RWSTrw'snb
  Map over the inner computation.

Totality: total
Visibility: public export
withRWST : (r'->s-> (r, s)) ->RWSTrwsma->RWSTr'wsma
  `withRWST f m` executes action `m` with an initial environment
and state modified by applying `f`.

Totality: total
Visibility: public export
RWS : Type->Type->Type->Type->Type
  A monad containing an environment of type `r`, output of type `w`
and an updatable state of type `s`.

This is `RWST` applied to `Identity`.

Totality: total
Visibility: public export
runRWS : Monoidw=>r->s->RWSrwsa-> (a, (s, w))
  Unwrap an RWS computation as a function.

This is the inverse of `rws`.

Totality: total
Visibility: public export
rws : Semigroupw=> (r->s-> (a, (s, w))) ->RWSrwsa
  Construct an RWS computation from a function.

This is the inverse of `runRWS`.

Totality: total
Visibility: public export
evalRWS : Monoidw=>r->s->RWSrwsa-> (a, w)
  Evaluate a computation with the given initial state and environment,
returning the final value and output, discarding the final state.

Totality: total
Visibility: public export
execRWS : Monoidw=>r->s->RWSrwsa-> (s, w)
  Evaluate a computation with the given initial state and environment,
returning the final state and output, discarding the final value.

Totality: total
Visibility: public export
mapRWS : (Monoidw, Semigroupw') => ((a, (s, w)) -> (b, (s, w'))) ->RWSrwsa->RWSrw'sb
  Map the return value, final state and output of a computation using
the given function.

Totality: total
Visibility: public export
withRWS : (r'->s-> (r, s)) ->RWSrwsa->RWSr'wsa
  `withRWS f m` executes action `m` with an initial environment
and state modified by applying `f`.

Totality: total
Visibility: public export