From ba58bf5b9ca7c41ab745e2d9b8006e6023a21ff6 Mon Sep 17 00:00:00 2001 From: Ryan Haskell-Glatz Date: Sun, 4 Aug 2019 13:34:54 -0500 Subject: [PATCH] update to latest elm syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just updating the Elm code example! 😃 Some of the modules and functions are no longer available. --- test/detect/elm/default.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/detect/elm/default.txt b/test/detect/elm/default.txt index f2380e5a21..5d9c384057 100644 --- a/test/detect/elm/default.txt +++ b/test/detect/elm/default.txt @@ -1,18 +1,22 @@ +import Browser import Html exposing (div, button, text) -import Html.App exposing (beginnerProgram) import Html.Events exposing (onClick) type Msg = Increment main = - beginnerProgram - { model = 0, view = view - , update = \Increment model -> model + 1 } + Browser.sandbox + { init = 0 + , update = \msg model -> model + 1 + , view = view + } view model = - div [] [ div [] [ text (toString model) ] - , button [ onClick Increment ] [ text "+" ] ] + div [] + [ div [] [ text (String.fromInt model) ] + , button [ onClick Increment ] [ text "+" ] + ] chars = String.cons 'C' <| String.cons 'h' <| "ars"