elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
173 stars 17 forks source link

min is ambiguous: Basics -vs- Html.Attributes #218

Open pdavidow opened 7 years ago

pdavidow commented 7 years ago

input [ type_ "number", min "1"] [] gives error:

-- TYPE MISMATCH ------------------------------------------------------ Main.elm

The 1st and 2nd entries in this list are different types of values.

40|             [ type_ "number", min "1"]
                                  ^^^^^^^
The 1st entry has this type:

    Html.Attribute msg

But the 2nd is:

    String -> String

Hint: It looks like a function needs 1 more argument.

but should rather give something like shown for https://ellie-app.com/38VC4xWKLxMa1/0:

This usage of variable min is ambiguous.
Maybe you want one of the following?

Basics.min
Html.Attributes.min

Same problem for max.