Hi,

I got the following syntax error:

I ran into something unexpected when parsing your code!
> 62|             { Rating.defaultViewConfig | readOnly = model.readOnly }
>                   ^
> I am looking for one of the following things:
>     a closing bracket '}'
>     a lower case name
>     whitespace


for the following snippet of code:

view : Model -> Html Msg
> view model =
>     let
>         ratingViewConfig =
>             { Rating.defaultViewConfig | readOnly = model.readOnly }
>     in
>         div []
>             [ Html.map SetRatingState <|
>                 Rating.view ratingViewConfig model.ratingState
>             , label []
>                 [ input
>                     [ type_ "checkbox"
>                     , checked model.readOnly
>                     , onClick ToggleReadOnly
>                     ]
>                     []
>                 , text "read only"
>                 ]
>             ]


If however I write the following:

    let
>         defaultViewConfig = Rating.defaultViewConfig
>         ratingViewConfig =
>             { defaultViewConfig | readOnly = model.readOnly }
>     in 

        ...


Then everything works fine. Is this a bug in the parser?

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to