Idris2Doc : Control.Monad.State.Interface

Control.Monad.State.Interface

interfaceMonadState : Type -> (Type -> Type) -> Type
  A computation which runs in a context and produces an output

Parameters: stateType, m
Constraints: Monad m
Methods:
get : mstateType
  Get the context
put : stateType -> m ()
  Write a new context/output
state : (stateType -> (stateType, a)) -> ma
  Embed a simple state action into the monad.

Implementations:
Monadm => MonadStatestateType (StateTstateTypem)
MonadStatesm => MonadStates (EitherTem)
MonadStatesm => MonadStates (MaybeTm)
Monadm => MonadStates (RWSTrwsm)
MonadStatesm => MonadStates (ReaderTrm)
MonadStatesm => MonadStates (WriterTrm)
get : MonadStatestateTypem => mstateType
  Get the context

Totality: total
gets : MonadStatestateTypem => (stateType -> a) -> ma
  Evaluate a function in the context held by this computation

Totality: total
modify : MonadStatestateTypem => (stateType -> stateType) -> m ()
  Apply a function to modify the context of this computation

Totality: total
put : MonadStatestateTypem => stateType -> m ()
  Write a new context/output

Totality: total
state : MonadStatestateTypem => (stateType -> (stateType, a)) -> ma
  Embed a simple state action into the monad.

Totality: total