ghc-8.2.2: The GHC API

State

newtype State s a #

Constructors

Fields

Instances

Methods

(>>=) :: State s a -> (a -> State s b) -> State s b Source #

(>>) :: State s a -> State s b -> State s b Source #

return :: a -> State s a Source #

fail :: String -> State s a Source #

fmap :: (a -> b) -> State s a -> State s b Source #

(<$) :: a -> State s b -> State s a Source #

pure :: a -> State s a Source #

(<*>) :: State s (a -> b) -> State s a -> State s b Source #

liftA2 :: (a -> b -> c) -> State s a -> State s b -> State s c Source #

(*>) :: State s a -> State s b -> State s b Source #

(<*) :: State s a -> State s b -> State s a Source #

get :: State s s #

gets :: (s -> a) -> State s a #

put :: s -> State s () #

modify :: (s -> s) -> State s () #

evalState :: State s a -> s -> a #

execState :: State s a -> s -> s #

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