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 r a s. State s a -> Run (state :: STATE s | r) a

#liftStateAt Source

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

#modify Source

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

#modifyAt Source

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

#put Source

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

#putAt Source

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

#get Source

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

#getAt Source

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

#gets Source

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

#getsAt Source

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

#runState Source

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

#runStateAt Source

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

#evalState Source

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

#evalStateAt Source

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

#execState Source

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

#execStateAt Source

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