Closed dpinn closed 5 years ago
Hi @dpinn, does the error go away if you write brackets around styled like so:
(Material.Options.styled Html.div [])
[ text "Hello World" ]
?
Most often styled
is used as:
styled
: (List (Html.Attribute msg) -> List (Html msg) -> Html msg)
-> List (Options.Property c msg)
-> List (Html msg)
-> Html msg
It might be that the IntelliJ plugin has a problem with the type inference a = (List (Html msg) -> Html msg)
, and it might be worth contacting the author about that.
Yes, the brackets do make the error go away. Of course elm-format removes them. It does appear that the IntelliJ plugin is having a problem with type inference.
This probably isn't a bug with elm-mdc, but I'd like some help understanding the problem, or finding a way around it.
I'm using IntelliJ IDEA with the Elm plugin by Keith Lazuka. When I use
Material.Options.styled
, I find that the code is highlighted as an error, the message being "The function expects 2 arguments, but it got 3 instead.Now, the definition of styled is:
... which is clearly a curried wrapper around the Internal.Options.styled call. It should all just work, but it doesn't. Do you use IntelliJ IDEA yourself? Do you have any insight into the cause of the problem. Should I be contacting the Elm plugin author about this?
With many thanks for your work, David