Module

Halogen.VDom

Re-exports from Halogen.VDom.DOM

#VDomSpec

newtype VDomSpec a w

Widget machines recursively reference the configured spec to potentially enable recursive trees of Widgets.

Constructors

#buildVDom

buildVDom :: forall a w. VDomSpec a w -> VDomMachine a w

Starts an initial VDom machine by providing a VDomSpec.

main = do
  machine1 ← buildVDom spec vdomTree1
  machine2 ← Machine.step machine1 vdomTree2
  machine3 ← Machine.step machine2 vdomTree3
  ...

Re-exports from Halogen.VDom.Machine

#Step'

data Step' a b s

Constructors

#Step

data Step :: Type -> Type -> Type

#Machine

type Machine a b = EffectFn1 a (Step a b)

#unStep

unStep :: forall a b r. (forall s. Step' a b s -> r) -> Step a b -> r

#step

step :: forall a b. EffectFn2 (Step a b) a (Step a b)

Runs the next step.

#mkStep

mkStep :: forall a b s. Step' a b s -> Step a b

#halt

halt :: forall a b. EffectFn1 (Step a b) Unit

Runs the finalizer associated with a Step

#extract

extract :: forall a b. Step a b -> b

Returns the output value of a Step.

Re-exports from Halogen.VDom.Types

#VDom

data VDom a w

The core virtual-dom tree type, where a is the type of attributes, and w is the type of "widgets". Widgets are machines that have complete control over the lifecycle of some DOM.Node.

The Grafted constructor and associated machinery enables bimap fusion using a Coyoneda-like encoding.

Constructors

Instances

#Namespace

#Graft

data Graft :: Type -> Type -> Type

Instances

#ElemName

#runGraft

runGraft :: forall a' w'. Graft a' w' -> VDom a' w'

Modules