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 r s f act ps i o

Constructors

#mapDriverState Source

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

#DriverStateRef Source

newtype DriverStateRef r f o

Constructors

#DriverStateRec Source

type DriverStateRec r s f act ps i o = { children :: SlotStorage ps (DriverStateRef r), childrenIn :: Ref (SlotStorage ps (DriverStateRef r)), childrenOut :: Ref (SlotStorage ps (DriverStateRef r)), component :: ComponentSpec 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 r s f act ps i o), state :: s, subscriptions :: Ref (Maybe (Map SubscriptionId Subscription)) }

#DriverStateX Source

data DriverStateX (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 r f i o x. (forall s act ps. DriverStateRec r s f act ps i o -> x) -> DriverStateX r f o -> x

#mkDriverStateXRef Source

mkDriverStateXRef :: forall r s f act ps i o. Ref (DriverState r s f act ps i o) -> Ref (DriverStateX 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 m r f o. Functor m => (forall s act ps. Maybe (r s act ps o) -> m (r s act ps o)) -> DriverStateX r f o -> m (RenderStateX r)

#renderStateX_ Source

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

#unRenderStateX Source

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

#initDriverState Source

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