Skip to content

Instantly share code, notes, and snippets.

@stormont
Created December 29, 2016 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stormont/176b2ab90a74650d939c9ae6a3aad730 to your computer and use it in GitHub Desktop.
Save stormont/176b2ab90a74650d939c9ae6a3aad730 to your computer and use it in GitHub Desktop.
Stub file for Elm projects
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