Module

Pha.Update

Package
purescript-pha
Repository
gbagan/purescript-pha

#delay Source

delay :: forall model msg m. MonadAff m => Milliseconds -> Update model msg m 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.

Re-exports from Effect.Aff

Re-exports from Effect.Aff.Class

#liftAff Source

liftAff :: forall m. MonadAff m => Aff ~> m

Re-exports from Effect.Class

#liftEffect Source

liftEffect :: forall m a. MonadEffect m => Effect a -> m a

Re-exports from Pha.Update.Internal

#Update Source

newtype Update :: Type -> Type -> (Type -> Type) -> Type -> Typenewtype Update model msg m a

Instances

#Subscription Source

type Subscription msg = (msg -> Effect Unit) -> Effect (Effect Unit)

#unsubscribe Source

unsubscribe :: forall model msg m. SubscriptionId -> Update model msg m Unit

#subscribe Source

subscribe :: forall model msg m. Subscription msg -> Update model msg m SubscriptionId

#mapModel Source

mapModel :: forall model model' msg m. Lens' model model' -> (Update model' msg m) ~> (Update model msg m)

#mapMessage Source

mapMessage :: forall model msg msg' m. (msg -> msg') -> (Update model msg m) ~> (Update model msg' m)

#hoist Source

hoist :: forall model msg m m'. (m ~> m') -> (Update model msg m) ~> (Update model msg m')