interface MonadState : Type -> (Type -> Type) -> Type A monadic computation that has access to state.
Parameters: stateType, m
Constraints: Monad m
Methods:
get : m stateType Get the context
put : stateType -> m () Write a new context/output
state : (stateType -> (stateType, a)) -> m a Embed a simple state action into the monad.
Implementations:
Monad m => MonadState stateType (StateT stateType m) MonadState s m => MonadState s (EitherT e m) MonadState s m => MonadState s (MaybeT m) Monad m => MonadState s (RWST r w s m) MonadState s m => MonadState s (ReaderT r m) MonadState s m => MonadState s (WriterT r m)
get : MonadState stateType m => m stateType Get the context
Totality: total
Visibility: public exportput : MonadState stateType m => stateType -> m () Write a new context/output
Totality: total
Visibility: public exportstate : MonadState stateType m => (stateType -> (stateType, a)) -> m a Embed a simple state action into the monad.
Totality: total
Visibility: public exportmodify : MonadState stateType m => (stateType -> stateType) -> m () Apply a function to modify the context of this computation
Totality: total
Visibility: public exportgets : MonadState stateType m => (stateType -> a) -> m a Evaluate a function in the context held by this computation
Totality: total
Visibility: public export