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

Union types haven't been renamed to Custom types in error messages #271

Closed rl-king closed 5 years ago

rl-king commented 5 years ago

A quick grep gives the following files in which there are error messages that refer to union types.

compiler/src/Reporting/Error/Type.hs
compiler/src/Reporting/Error/Cononicalize.hs
compiler/src/Reporting/Error/Syntax.hs
compiler/src/Optimize/Port.hs

I could PR this but as they're still called Union Types internally, I'll submit this first, since there might be an idea/plan for this.

evancz commented 5 years ago

These have been getting updated as I have been going through error messages for 0.19.1, so running grep "union type" compiler/src/Reporting -r produces no results these days.

There is one still in compiler/src/Optimize/Port.hs but that is there in case certain compiler bugs are introduced, not for reporting things to users. I'll tweak it in a second anyway!

I think the name will probably remain the same in a lot of the compiler code. It may get renamed slowly over time, but I don't think it's worth the risk of doing so many renames all at once.