Module Control.Monad.Trans.State

Summary of exported operations:

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

Exported datatypes:


StateT

Constructor:

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

    Fields:

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

State

Type synonym: State a b = StateT a Identity b


Exported operations:

get :: Monad a => StateT b a b   

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

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

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

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

evalStateT :: Functor a => StateT b a c -> b -> a c   

execStateT :: Functor a => StateT b a c -> b -> a b   

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

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

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

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

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

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

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