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`.
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`.

Totality: total
recordRWST : Type -> Type -> Type -> (Type -> Type) -> Type -> Type
  A monad transformer adding reading an environment of type `r`,
collecting an output of type `w` and updating a state of type `s`
to an inner monad `m`.

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

Projection: 
.unRWST : RWSTrwsma -> r -> s -> w -> m (a, (s, w))
evalRWS : Monoidw => RWSrwsa -> r -> s -> (a, w)
  Evaluate a computation with the given initial state and environment,
returning the final value and output, discarding the final state.

Totality: total
evalRWST : (Functorm, Monoidw) => RWSTrwsma -> r -> s -> 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
execRWS : Monoidw => RWSrwsa -> r -> s -> (s, w)
  Evaluate a computation with the given initial state and environment,
returning the final state and output, discarding the final value.

Totality: total
execRWST : (Functorm, Monoidw) => RWSTrwsma -> r -> s -> 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
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
mapRWST : (Functorn, (Monoidw, Semigroupw')) => (m (a, (s, w)) -> n (b, (s, w'))) -> RWSTrwsma -> RWSTrw'snb
  Map the inner computation using the given function.

Totality: total
runRWS : Monoidw => RWSrwsa -> r -> s -> (a, (s, w))
  Unwrap an RWS computation as a function. (The inverse of `rws`.)

Totality: total
runRWST : Monoidw => RWSTrwsma -> r -> s -> m (a, (s, w))
  Unwrap an RWST computation as a function. (The inverse of `rwsT`.)

Totality: total
rws : Semigroupw => (r -> s -> (a, (s, w))) -> RWSrwsa
  Construct an RWS computation from a function. (The inverse of `runRWS`.)

Totality: total
rwsT : (Functorm, Semigroupw) => (r -> s -> m (a, (s, w))) -> RWSTrwsma
  Construct an RWST computation from a function. (The inverse of `runRWST`.)

Totality: total
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
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