Module

Pha.Update

Package
purescript-pha
Repository
gbagan/purescript-pha

#UpdateF Source

data UpdateF state a

Constructors

Instances

#Update Source

newtype Update state a

Constructors

Instances

#Update' Source

type Update' state = Update state Unit

#delay Source

delay :: forall state. Milliseconds -> Update state Unit

Re-exports from Control.Monad.State.Class

#put Source

put :: forall m s. MonadState s m => s -> m Unit

Set the state.

#modify_ Source

modify_ :: forall s m. MonadState s m => (s -> s) -> m Unit

#modify Source

modify :: forall s m. MonadState s m => (s -> s) -> m s

Modify the state by applying a function to the current state. The returned value is the new state value.

#gets Source

gets :: forall s m a. MonadState s m => (s -> a) -> m a

Get a value which depends on the current state.

#get Source

get :: forall m s. MonadState s m => m s

Get the current state.