Skip to content

Instantly share code, notes, and snippets.

@tai2
Created July 24, 2017 14:24
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 tai2/297e018df99552a4d49f868200e2875e to your computer and use it in GitHub Desktop.
Save tai2/297e018df99552a4d49f868200e2875e to your computer and use it in GitHub Desktop.
module App exposing (..)
import Html exposing (Html, div, text, program)
-- MODEL
type alias Model =
String
init : ( Model, Cmd Msg )
init =
( "Hello", Cmd.none )
-- MESSAGES
type Msg
= NoOp
-- VIEW
view : Model -> Html Msg
view model =
div []
[ text model ]
-- UPDATE
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
NoOp ->
( model, Cmd.none )
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
-- MAIN
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment