Module

Run.State

Package
purescript-run
Repository
natefaubion/purescript-run

#State Source

data State s a

Constructors

Instances

#STATE Source

type STATE :: Type -> Row (Type -> Type) -> Row (Type -> Type)type STATE s r = (state :: State s | r)

#_state Source

_state :: Proxy "state"

#liftState Source

liftState :: forall s a r. State s a -> Run ((STATE s) + r) a

#liftStateAt Source

liftStateAt :: forall q sym s a r. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> State s a -> Run r a

#modify Source

modify :: forall s r. (s -> s) -> Run ((STATE s) + r) Unit

#modifyAt Source

modifyAt :: forall q sym s r. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> (s -> s) -> Run r Unit

#put Source

put :: forall s r. s -> Run ((STATE s) + r) Unit

#putAt Source

putAt :: forall q sym s r. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> s -> Run r Unit

#get Source

get :: forall s r. Run ((STATE s) + r) s

#getAt Source

getAt :: forall q sym s r. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> Run r s

#gets Source

gets :: forall s t r. (s -> t) -> Run ((STATE s) + r) t

#getsAt Source

getsAt :: forall q sym s t r. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> (s -> t) -> Run r t

#runState Source

runState :: forall s r a. s -> Run ((STATE s) + r) a -> Run r (Tuple s a)

#runStateAt Source

runStateAt :: forall q sym s r a. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> s -> Run r a -> Run q (Tuple s a)

#evalState Source

evalState :: forall s r a. s -> Run ((STATE s) + r) a -> Run r a

#evalStateAt Source

evalStateAt :: forall q sym s r a. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> s -> Run r a -> Run q a

#execState Source

execState :: forall s r a. s -> Run ((STATE s) + r) a -> Run r s

#execStateAt Source

execStateAt :: forall q sym s r a. IsSymbol sym => Cons sym (State s) q r => Proxy sym -> s -> Run r a -> Run q s