Module

Pha.Update

Package
purescript-pha
Repository
gbagan/purescript-pha

#Update Source

type Update st effs = Run (state :: STATE st | effs) Unit

#get Source

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

return the current state

#modify Source

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

evaluate a function over the current state and set the result to the state

#modify' Source

modify' :: forall st effs. (st -> st) -> Run (state :: STATE st | effs) st

same as setState except it returns the current state after applying the function

#put Source

put :: forall st effs. st -> Run (state :: STATE st | effs) Unit

#STATE Source

type STATE st = FProxy (State st)

#State Source

data State st a

Constructors

Instances

#_state Source

_state :: SProxy "state"