Module
Run.Halogen
- Package
- purescript-run-halogen
- Repository
- sigilion/purescript-run-halogen
#runHalogen Source
runHalogen :: forall m output slots action state. (Run (halogen :: HALOGEN state action slots output m)) ~> (HalogenM state action slots output m)
de-variant an effect stack containing only the halogen effect, so that it can be used for query/action evaluation
#runEffectHalogen Source
runEffectHalogen :: forall a r m output slots action state. MonadEffect m => Run (effect :: EFFECT, halogen :: HALOGEN state action slots output m | r) a -> Run (halogen :: HALOGEN state action slots output m | r) a
Lifts the "effect" effect into HalogenF, so that you can use runHalogen
#query Source
query :: forall _1 a slot output' query slots label m output action state. Cons label (Slot query output' slot) _1 slots => IsSymbol label => Ord slot => SProxy label -> slot -> query a -> HalogenF state action slots output m (Maybe a)
The query function from Halogen.Query.HalogenM without the Free wrapper, so it can be put into a variant.
#runChildHalogen Source
runChildHalogen :: forall a r' _1 output' f slots label r m output action state. Cons label (Slot f output' Unit) _1 slots => Cons label (FProxy f) (except :: FAIL, halogen :: HALOGEN state action slots output m | r) r' => Functor m => IsSymbol label => SProxy label -> Run r' a -> Run (except :: FAIL, halogen :: HALOGEN state action slots output m | r) a
For certain effects in the Run effect stack it can be useful to evaluate it using a component with the effect algebra as its query algebra, and using the effect id as the component slot id (with Unit as the index). runChildHalogen automates that.
- Modules
- Run.
Halogen