aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
blob: c2a7519c9329bccddd2cbf5ed31101abcca2cd80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Main
  ( main
  ) where

import Signal
import Html (Html)
import Time (..)

import Model.Model (..)
import Update.Update (..)
import View.View (view)

main : Signal Html
main = Signal.map view model

model : Signal Model
model = Signal.foldp update (initialModel initialTime) input

input : Signal Action
input =
  Signal.mergeMany
    [ Signal.subscribe updates
    , Signal.map DeltaTime (fps 30)
    ]

port initialTime : Time