Erik Timmers b24b6df448 [elm] Add support for Elm 0.19 (#937)
* [elm] Add support for Elm 0.19

* add elm 0.18 samples, update cli option

* fix elm 0.18 compile test

* [elm] 0.19 fixes & improvements
2018-09-04 14:24:43 +08:00

62 lines
693 B
Elm

module Main exposing (main)
import Browser
import Html exposing (Html)
main : Program () Model Msg
main =
Browser.element
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
-- MODEL
type alias Model =
{ value : Int
}
init : () -> ( Model, Cmd Msg )
init _ =
( Model 0, Cmd.none )
-- UPDATE
type Msg
= NoOp
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
NoOp ->
( model, Cmd.none )
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions _ =
Sub.none
-- VIEW
view : Model -> Html Msg
view _ =
Html.text "main"