module Main ( main ) where import Graphics.Element exposing (..) import Html exposing (Html) import StartApp exposing (App) import Effects exposing (Effects, Never) import Task exposing (..) import Time exposing (..) import Model exposing (Model, initialModel) import Model.Action exposing (..) import Update exposing (update) import View exposing (view) import Persona as Persona exposing (operations) import Server main : Signal Html main = app.html app : App Model app = StartApp.start { init = ( initialModel initialTime translations config , Server.init |> Task.map GoLoggedInView |> flip Task.onError (always <| Task.succeed GoSignInView) |> Effects.task ) , view = view , update = update , inputs = [ Signal.map UpdateTime (Time.every 1000) , Signal.map SignIn validateSignIn ] } port tasks : Signal (Task.Task Never ()) port tasks = app.tasks -- Input ports port initialTime : Time port translations : String port config : String port validateSignIn : Signal String -- Output ports port askSignIn : Signal String port askSignIn = Signal.map toString operations.signal