Idris2Doc : Control.Monad.State.Interface

Control.Monad.State.Interface

Definitions

interfaceMonadState : Type-> (Type->Type) ->Type
  A monadic computation that has access to state.

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
Visibility: public export
put : MonadStatestateTypem=>stateType->m ()
  Write a new context/output

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

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

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

Totality: total
Visibility: public export