Installed

elm/browser
1.0.2
elm/core
1.0.5
elm/html
1.0.0

Registry

elm/http
2.0.0
elm/random
1.0.0
elm/time
1.0.0
elm/file
1.0.5
elm/json
1.1.3
elm/svg
1.0.1
evancz/elm-playground
1.0.3
elm-explorations/webgl
1.1.3
w0rm/elm-physics
5.1.3
rtfeldman/elm-css
18.0.0
mdgriffith/elm-ui
1.1.8
​x
 
1
module Main exposing (..)
2
​
3
-- Press buttons to increment and decrement a counter.
4
--
5
-- Read how it works:
6
--   https://guide.elm-lang.org/architecture/buttons.html
7
--
8
​
9
​
10
import Browser
11
import Html exposing (Html, button, div, text)
12
import Html.Events exposing (onClick)
13
​
14
​
15
​
16
-- MAIN
17
​
18
​
19
main =
20
  Browser.sandbox { init = init, update = update, view = view }
21
​
22
​
23
​
24
-- MODEL
25
​
26
​
27
type alias Model = Int
28
​
29
​
30
init : Model
31
init =
32
  0
33
​
34
​
35
​
36
-- UPDATE
37
​
38
​
39
type Msg
40
  = Increment
41
  | Decrement
42
​
43
​
44
update : Msg -> Model -> Model
45
update msg model =
46
  case msg of
47
    Increment ->
48
      model + 1
49
​