Hi,
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"
> ]
> ]
causes the following error to occur:
I ran into something unexpected when parsing your code!
> 63| { Rating.defaultViewConfig | readOnly = model.readOnly }
> ^
> I am looking for one of the following things:
> a closing bracket '}'
> a lower case name
> whitespace
However, if I update the let bindings as follows:
let
> defaultViewConfig = Rating.defaultViewConfig
> ratingViewConfig =
> { defaultViewConfig | readOnly = model.readOnly }
> in
> ...
Then, there is no error. Am I missing something or 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.