Skip to content

Instantly share code, notes, and snippets.

@shamansir
Last active August 14, 2020 08:49
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 shamansir/b9fc314071f09ad11c112b3ca73fb034 to your computer and use it in GitHub Desktop.
Save shamansir/b9fc314071f09ad11c112b3ca73fb034 to your computer and use it in GitHub Desktop.
Elm program quick template
module Main exposing (..)
import Browser
import Html exposing (Html)
import Html as H
type alias Flags = ()
type alias Model = ()
type alias Msg = ()
init : Flags -> ( Model, Cmd Msg )
init _ = ( (), Cmd.none )
update : Msg -> Model -> ( Model, Cmd Msg )
update _ model = ( model, Cmd.none )
subscription : Model -> Sub Msg
subscription _ = Sub.none
view : Model -> Html Msg
view _ = H.div [] []
main : Program Flags Model Msg
main =
Browser.element
{ init = init
, update = update
, subscriptions = subscription
, view = view
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment