Module Control.Monad.Trans.State

Summary of exported operations:

get :: Monad a => StateT b a b  Deterministic 
put :: Monad a => b -> StateT b a ()  Deterministic 
state :: Monad a => (b -> (c,b)) -> StateT b a c  Deterministic 
modify :: Monad a => (b -> b) -> StateT b a ()  Deterministic 
gets :: Monad a => (b -> c) -> StateT b a c  Deterministic 
evalStateT :: Monad a => StateT b a c -> b -> a c  Deterministic 
execStateT :: Monad a => StateT b a c -> b -> a b  Deterministic 
mapStateT :: (Monad a, Monad b) => (a (c,d) -> b (e,d)) -> StateT d a c -> StateT d b e  Deterministic 
withStateT :: Monad a => (b -> b) -> StateT b a c -> StateT b a c  Deterministic 
runState :: StateT a Identity b -> a -> (b,a)  Deterministic 
evalState :: StateT a Identity b -> a -> b  Deterministic 
execState :: StateT a Identity b -> a -> a  Deterministic 
mapState :: ((a,b) -> (c,b)) -> StateT b Identity a -> StateT b Identity c  Deterministic 
withState :: (a -> a) -> StateT a Identity b -> StateT a Identity b  Deterministic 

Exported datatypes:


newtype StateT

Constructor:

  • StateT :: (a -> b (c,a)) -> StateT a b c

    Fields:

    • runStateT :: (a -> b (c,a))

State

Type synonym: State a = StateT a Identity


Exported operations:

get :: Monad a => StateT b a b  Deterministic 

put :: Monad a => b -> StateT b a ()  Deterministic 

state :: Monad a => (b -> (c,b)) -> StateT b a c  Deterministic 

modify :: Monad a => (b -> b) -> StateT b a ()  Deterministic 

gets :: Monad a => (b -> c) -> StateT b a c  Deterministic 

evalStateT :: Monad a => StateT b a c -> b -> a c  Deterministic 

execStateT :: Monad a => StateT b a c -> b -> a b  Deterministic 

mapStateT :: (Monad a, Monad b) => (a (c,d) -> b (e,d)) -> StateT d a c -> StateT d b e  Deterministic 

withStateT :: Monad a => (b -> b) -> StateT b a c -> StateT b a c  Deterministic 

runState :: StateT a Identity b -> a -> (b,a)  Deterministic 

evalState :: StateT a Identity b -> a -> b  Deterministic 

execState :: StateT a Identity b -> a -> a  Deterministic 

mapState :: ((a,b) -> (c,b)) -> StateT b Identity a -> StateT b Identity c  Deterministic 

withState :: (a -> a) -> StateT a Identity b -> StateT a Identity b  Deterministic