blob: 743c776ba2c3ed990894314bbbd716d4d8eb1c4b (
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
27
28
29
|
port module Main exposing
( main
)
import Html.App exposing (programWithFlags)
import Time
import Char
import Model exposing (init)
import Model.Keyboard exposing (KeyCode)
import Msg
import Update exposing (update)
import View exposing (view)
main : Program Float
main =
programWithFlags
{ init = init
, update = update
, subscriptions = (\model ->
Sub.batch
[ Time.every 40 Msg.Time
, keyPress Msg.KeyPressed
]
)
, view = view
}
port keyPress : (KeyCode -> msg) -> Sub msg
|