aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-16 00:15:05 +0100
committerJoris Guyonvarch2015-03-16 00:15:05 +0100
commitcd3b37adebca99138fad1acca37908183036ace9 (patch)
treed566ae0564d82ab94901e4deda98f36abd22ad2d /src/Main.elm
Initial commit, can create and name 5 minute timers, can toggle running state
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