Module

Run.State

Package
purescript-run
Repository
natefaubion/purescript-run

#State Source

data State s a

Constructors

Instances

#STATE Source

type STATE s = FProxy (State s)

#_state Source

_state :: SProxy "state"

#liftState Source

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

#liftStateAt Source

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

#modify Source

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

#modifyAt Source

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

#put Source

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

#putAt Source

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

#get Source

get :: forall s r. Run (state :: STATE s | r) s

#getAt Source

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

#gets Source

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

#getsAt Source

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

#runState Source

runState :: forall s r a. s -> Run (state :: 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 => SProxy sym -> s -> Run r a -> Run q (Tuple s a)

#evalState Source

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

#evalStateAt Source

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

#execState Source

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

#execStateAt Source

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