Closed sentience closed 5 years ago
Ended up removing the hint in https://github.com/elm/compiler/commit/0cd361d54c3a56940ebf94882069adf1fbc4600e. Seems like it's actively confusing in some cases, and in general, probably very rarely the real problem. It is not possible to get the kind of specificity you are describing without rewriting certain aspects of the code that colors in the differences between types, and I think it'd be too risky to try that so close to a release.
Thank you for reporting this!
SSCCE: https://ellie-app.com/3gZsGj7pdnLa1
When the compiler expects a record with a field of type
List a
, but it gets a record with a field of typea
, it displays the following hint:This is confusing, because it is unclear what “it” refers to. Something like this might be better: