Module

Halogen.VDom

Package
purescript-halogen-vdom
Repository
slamdata/purescript-halogen-vdom

Re-exports from Halogen.VDom.DOM

#VDomStep Source

type VDomStep eff a b = Eff eff (Step (Eff eff) a b)

#VDomSpec Source

newtype VDomSpec eff a w

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

Constructors

#VDomMachine Source

type VDomMachine eff a b = Machine (Eff eff) a b

#buildVDom Source

buildVDom :: forall w a eff. VDomSpec (VDomEffects eff) a w -> VDomMachine (VDomEffects eff) (VDom a w) Node

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 Source

data Step m a b

Constructors

Instances

#Machine Source

type Machine m a b = a -> m (Step m a b)

#step Source

step :: forall b a m. Step m a b -> a -> m (Step m a b)

Runs the next step.

#halt Source

halt :: forall b a m. Step m a b -> m Unit

Runs the finalizer associated with a Step

#extract Source

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

Returns the output value of a Step.

Re-exports from Halogen.VDom.Types

#VDom Source

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

#Graft Source

data Graft :: Type -> Type -> Type

Instances

#ElemSpec Source

data ElemSpec a

Constructors

Instances

#runGraft Source

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