Skip to content

Instantly share code, notes, and snippets.

@lachenmayer
Created July 18, 2015 18:49
Show Gist options
  • Save lachenmayer/e2938278308396fc2ad6 to your computer and use it in GitHub Desktop.
Save lachenmayer/e2938278308396fc2ad6 to your computer and use it in GitHub Desktop.
module ModuleName (Action, Model, init, update, view) where
import Html as H exposing (Html)
import Html.Attributes as A
import Html.Events as E
import Signal as S exposing (Signal, Mailbox, Address, (<~))
type Action
= NoOp
type alias Model =
{ {-TODO-} }
init : Model
init =
{ {-TODO-} }
actions : Mailbox Action
actions =
S.mailbox NoOp
update : Action -> Model -> Model
update action model =
case action of
NoOp -> model
model : Signal Model
model =
S.foldp update init actions.signal
view : Address Action -> Model -> Html
view address model =
H.div [] []
main : Signal Html
main =
view actions.address <~ model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment