Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created April 12, 2016 14:41
Show Gist options
  • Save ccapndave/115d93321d466b99fe7430745c4306b4 to your computer and use it in GitHub Desktop.
Save ccapndave/115d93321d466b99fe7430745c4306b4 to your computer and use it in GitHub Desktop.
module Page.ExercisePage where
mailbox : Signal.Mailbox Action
mailbox =
Signal.mailbox Noop
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