Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. module App exposing (..)
  2.  
  3. import Html exposing (Html, div, text, program)
  4.  
  5.  
  6. -- MODEL
  7.  
  8.  
  9. type alias Model =
  10. String
  11.  
  12.  
  13. init : ( Model, Cmd Msg )
  14. init =
  15. ( "Hello", Cmd.none )
  16.  
  17.  
  18.  
  19. -- MESSAGES
  20.  
  21.  
  22. type Msg
  23. = NoOp
  24.  
  25.  
  26.  
  27. -- VIEW
  28.  
  29.  
  30. view : Model -> Html Msg
  31. view model =
  32. div []
  33. [ text model ]
  34.  
  35.  
  36.  
  37. -- UPDATE
  38.  
  39.  
  40. update : Msg -> Model -> ( Model, Cmd Msg )
  41. update msg model =
  42. case msg of
  43. NoOp ->
  44. ( model, Cmd.none )
  45.  
  46.  
  47.  
  48. -- SUBSCRIPTIONS
  49.  
  50.  
  51. subscriptions : Model -> Sub Msg
  52. subscriptions model =
  53. Sub.none
  54.  
  55.  
  56.  
  57. -- MAIN
  58.  
  59.  
  60. main : Program Never Model Msg
  61. main =
  62. program
  63. { init = init
  64. , view = view
  65. , update = update
  66. , subscriptions = subscriptions
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement