Created
April 12, 2016 14:41
-
-
Save ccapndave/115d93321d466b99fe7430745c4306b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Page.ExercisePage where | |
mailbox : Signal.Mailbox Action | |
mailbox = | |
Signal.mailbox Noop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Html exposing (Html) | |
import Effects exposing (Never) | |
import Task exposing (Task) | |
import StartAppWithInits as StartApp exposing (start, App) | |
import App exposing (init, update, view) | |
import Random.PCG exposing (generate, initialSeed2, Seed) | |
import Time exposing (Time) | |
import HotReload | |
import Page.ExercisePage as ExercisePage | |
import Component.Timer as Timer | |
app : StartApp.App App.Model | |
app = | |
start | |
{ init = (if useHotReload then HotReload.init else identity) <| init initialSeed | |
, update = update | |
, view = view | |
, inputs = | |
[ Time.every 250 |> Signal.map (App.ExercisePageAction << ExercisePage.TimerAction << Timer.TimerTick) | |
, ExercisePage.mailbox.signal | |
] | |
, inits = | |
[ Signal.constant () |> Time.timestamp |> Signal.map fst |> Signal.map (App.ExercisePageAction << ExercisePage.TimerAction << Timer.TimerTick) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment