fbonetti / elm-rails

View helpers for incorporating Elm modules into Rails views
MIT License
75 stars 20 forks source link

Update the README with working example for ELM 0.17+ #10

Closed donv closed 7 years ago

donv commented 8 years ago

Hi!

The example in the README gives me the following error when using ELM 0.17.1:

-- SYNTAX PROBLEM ------------------------------------- app/assets/elm/Hello.elm

I ran into something unexpected when parsing your code!

1| module Hello where
                ^
I am looking for one of the following things:

    something like `exposing (..)` which replaced `where` in 0.17
    whitespace

Since this is my very first attempt at ELM, the first example I encounter should work with the current stable version 😄 . If a PR is desired, I can do it.

fibrasek commented 8 years ago

You can do the basic hello-elm example:

module Hello exposing (..)

import Html exposing (..)

main =
  div [] [ text "Hello, World!" 

:)

lsimoneau commented 7 years ago

Resolved in #12