Module

Halogen.Aff.Driver.State

Package
purescript-halogen
Repository
purescript-halogen/purescript-halogen

#LifecycleHandlers Source

type LifecycleHandlers = { finalizers :: List (Aff Unit), initializers :: List (Aff Unit) }

#DriverState Source

newtype DriverState h r s f act ps i o

Constructors

#mapDriverState Source

mapDriverState :: forall o i ps act f s r h. (DriverStateRec h r s f act ps i o -> DriverStateRec h r s f act ps i o) -> DriverState h r s f act ps i o -> DriverState h r s f act ps i o

#DriverStateRef Source

newtype DriverStateRef h r f o

Constructors

#DriverStateRec Source

type DriverStateRec h r s f act ps i o = { children :: SlotStorage ps (DriverStateRef h r), childrenIn :: Ref (SlotStorage ps (DriverStateRef h r)), childrenOut :: Ref (SlotStorage ps (DriverStateRef h r)), component :: ComponentSpec h s f act ps i o Aff, forks :: Ref (Map ForkId (Fiber Unit)), fresh :: Ref Int, handlerRef :: Ref (o -> Aff Unit), lifecycleHandlers :: Ref LifecycleHandlers, pendingHandlers :: Ref (Maybe (List (Aff Unit))), pendingOuts :: Ref (Maybe (List (Aff Unit))), pendingQueries :: Ref (Maybe (List (Aff Unit))), refs :: Map String Element, rendering :: Maybe (r s act ps o), selfRef :: Ref (DriverState h r s f act ps i o), state :: s, subscriptions :: Ref (Maybe (Map SubscriptionId (Finalizer Aff))) }

#DriverStateX Source

data DriverStateX (h :: Type -> Type -> Type) (r :: Type -> Type -> Row Type -> Type -> Type) (f :: Type -> Type) (o :: Type)

A version of DriverState with the aspects relating to child components existentially hidden.

#unDriverStateX Source

unDriverStateX :: forall x o i f r h. (forall ps act s. DriverStateRec h r s f act ps i o -> x) -> DriverStateX h r f o -> x

#mkDriverStateXRef Source

mkDriverStateXRef :: forall o i ps act f s r h. Ref (DriverState h r s f act ps i o) -> Ref (DriverStateX h r f o)

#RenderStateX Source

data RenderStateX (r :: Type -> Type -> Row Type -> Type -> Type)

A wrapper of r from DriverState with the aspects relating to child components existentially hidden.

#renderStateX Source

renderStateX :: forall o f r h m. Functor m => (forall ps act s. Maybe (r s act ps o) -> m (r s act ps o)) -> DriverStateX h r f o -> m (RenderStateX r)

#renderStateX_ Source

renderStateX_ :: forall o f r h m. Applicative m => (forall ps act s. r s act ps o -> m Unit) -> DriverStateX h r f o -> m Unit

#unRenderStateX Source

unRenderStateX :: forall x r. (forall o ps f s. r s f ps o -> x) -> RenderStateX r -> x

#initDriverState Source

initDriverState :: forall o i ps act f s r h. ComponentSpec h s f act ps i o Aff -> i -> (o -> Aff Unit) -> Ref LifecycleHandlers -> Effect (Ref (DriverStateX h r f o))