aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.elm')
-rw-r--r--src/Main.elm26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Main.elm b/src/Main.elm
new file mode 100644
index 0000000..c2a7519
--- /dev/null
+++ b/src/Main.elm
@@ -0,0 +1,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