tweag / linear-types

Drafts, notes and resources for adding linear typing to GHC.
75 stars 5 forks source link

Simpler error message #16

Open varosi opened 5 years ago

varosi commented 5 years ago

A proposal about error message:

Couldn't match expected multiplicity ‘'One’ of variable ‘a’ with actual multiplicity ‘'Omega’

Is it possible to show a simpler error message in such cases, as:

Variable ‘a’ is used more than once.

It'll be more understandable by more people.

aspiwack commented 5 years ago

Note: it's better to use tweag/ghc to report such issues.

There is already a conversation on error messages, by the way: tweag/ghc#5 .

The short story is: error messages are still not good, and certainly not definitive.

I've got issues with things like “more than once”, though:

varosi-chaosgroup commented 5 years ago

Then may be: "not exactly once" ?

varosi-chaosgroup commented 5 years ago

In the ideal case there could be different error messages for different groups of errors, so they sound understandable for the average haskeller.