Module

Flame

Package
purescript-flame
Repository
easafe/purescript-flame

Entry module for a default Flame application

Re-exports from Flame.Application.EffectList

#(:>) Source

Operator alias for Data.Tuple.Tuple (right-associative / precedence 6)

Infix tuple constructor

Re-exports from Flame.Application.Effectful

#World Source

type World model message = { event :: Maybe Event, previousMessage :: Maybe message, previousModel :: model, update :: model -> message -> Aff model, view :: model -> Aff Unit }

World contains context information for Application.update

  • update – recurse Application.update with given model and message
  • view – forcefully update view with given model
  • event – the Event currently being handled
  • previousModel – model before last update
  • previousMessage – last message raised

#Application Source

type Application model message = App model message (init :: Tuple model (Maybe message), update :: World model message -> model -> message -> Aff model)

Application contains

  • init – the initial model and an optional message to invoke update with
  • view – a function to update your markup
  • update – a function to update your model
  • inputs – an array of signals

#mount Source

mount :: forall message model. String -> Application model message -> Effect Unit

Mount a Flame application in the given selector

#emptyApp Source

emptyApp :: Application Unit Unit

A bare bones application

Re-exports from Flame.Types

#Html Source

type Html = Element

Type synonym for view functions