Created
December 29, 2016 17:56
-
-
Save stormont/176b2ab90a74650d939c9ae6a3aad730 to your computer and use it in GitHub Desktop.
Stub file for Elm projects
This file contains 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 exposing (main) | |
import Html exposing (..) | |
-- MODEL | |
type alias Model = | |
{ | |
} | |
initializeModel : Model | |
initializeModel = | |
Model | |
-- UPDATE | |
type Msg | |
= Initialize | |
update : Msg -> Model -> (Model, Cmd Msg) | |
update msg model = | |
case msg of | |
Initialize -> | |
( model, Cmd.none ) | |
-- SUBSCRIPTIONS | |
subscriptions : Model -> Sub Msg | |
subscriptions model = | |
Sub.batch | |
[] | |
-- VIEW | |
view : Model -> Html Msg | |
view model = | |
div [] [] | |
-- ENTRY POINT | |
main : Program Never Model Msg | |
main = | |
Html.program | |
{ init = initializeApp | |
, subscriptions = subscriptions | |
, update = update | |
, view = view | |
} | |
initializeApp : (Model, Cmd Msg) | |
initializeApp = | |
( initializeModel | |
, Cmd.none | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment