mtl-c-0: Monad transformers using continuation passing style

Safe HaskellTrustworthy
LanguageHaskell98

Control.Monad.State.CPS

Documentation

newtype StateT s m a Source

Constructors

StateT 

Fields

unStateT :: forall r. s -> (a -> s -> m r) -> m r
 

runStateT :: Monad m => 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

mapStateT :: (Monad m, Monad n) => (m (a, s) -> n (b, s)) -> StateT s m a -> StateT s n b Source

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

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

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