ether-0.4.0.2: Monad transformers and classes

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Ether.Implicit.State.Strict

Contents

Description

Synopsis

MonadState class

get :: forall s m. MonadState s m => m s Source

See get.

put :: forall s m. MonadState s m => s -> m () Source

See put.

state :: forall s m a. MonadState s m => (s -> (a, s)) -> m a Source

See state.

modify :: forall s m. MonadState s m => (s -> s) -> m () Source

See modify.

gets :: forall s m a. MonadState s m => (s -> a) -> m a Source

See gets.

The State monad

type State s = State s s Source

See State.

runState :: State s a -> s -> (a, s) Source

evalState :: State s a -> s -> a Source

execState :: State s a -> s -> s Source

The StateT monad transformer

type StateT s = StateT s s Source

See StateT.

stateT :: (s -> m (a, s)) -> StateT s m a Source

See stateT.

runStateT :: StateT s m a -> s -> m (a, s) Source

evalStateT :: Monad m => StateT s m a -> s -> m a Source

execStateT :: Monad m => StateT s m a -> s -> m s Source