Open rtfeldman opened 7 years ago
Related to this. Capitalization mistakes in records produce unhelpful error messages. Someone using elm-ui got stuck with this error and it took me several minutes before I noticed onchange
should be onChange
This argument is a record of type:
{ checked : Bool
, icon : Bool -> Element msg1
, label : Label msg
, onchange : Bool -> Msg
}
But `checkbox` needs the 2nd argument to be:
{ checked : Bool
, icon : Bool -> Element msg
, label : Label msg
, onChange : Bool -> msg
}
I saw this in
#beginners
on Elm Slack:They used
OK
instead ofOk
. At a glance, I can see how someone might look at their code and look at the suggestion ofDid you mean "Ok"?
and not spot the distinction.Hints could detect when one of the suggestions matches what you typed exactly, except for capitalization (e.g. with
if String.toLower actual == String.toLower suggestion
) and call this out. Something like: