Idris2Doc : Control.Monad.RWS.CPS

Control.Monad.RWS.CPS

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`.
RWST : 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: 
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.
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.
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.
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.
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.
mapRWST : (Functorn, (Monoidw, Semigroupw')) => (m (a, (s, w)) -> n (b, (s, w'))) -> RWSTrwsma -> RWSTrw'snb
Map the inner computation using the given function.
runRWS : Monoidw => RWSrwsa -> r -> s -> (a, (s, w))
Unwrap an RWS computation as a function. (The inverse of `rws`.)
runRWST : Monoidw => RWSTrwsma -> r -> s -> m (a, (s, w))
Unwrap an RWST computation as a function. (The inverse of `rwsT`.)
rws : Semigroupw => (r -> s -> (a, (s, w))) -> RWSrwsa
Construct an RWS computation from a function. (The inverse of `runRWS`.)
rwsT : (Functorm, Semigroupw) => (r -> s -> m (a, (s, w))) -> RWSTrwsma
Construct an RWST computation from a function. (The inverse of `runRWST`.)
withRWS : (r' -> s -> (r, s)) -> RWSrwsa -> RWSr'wsa
`withRWS f m` executes action `m` with an initial environment
and state modified by applying `f`.
withRWST : (r' -> s -> (r, s)) -> RWSTrwsma -> RWSTr'wsma
`withRWST f m` executes action `m` with an initial environment
and state modified by applying `f`.