Skip to content

Change the phrasing "Arising from the use of" to "Required by the use of" in no instance errors

Motivation

While trying to teach some friends Haskell, I noticed a lot of them were confused by the compiler error you get when you're missing a constraint in the type signature of a function. A few of them thought that this was some sort of exceptional condition in the object-oriented sense, due to the similarity between "arising" and "raise" (although this particular confusion is more to do with the fact that they're primarily Ruby programmers than anything else).

I think that a simple language change could make the error more clear, and just as correct.

Proposal

Change the phrasing "arising from the use of" to "required by the use of" in errors involving missing instances. It conveys the same information ("I need an instance here that I can't find,") while being more clear to beginners.

This is a little more complicated than I initially thought as the phrasing "Arising from" is used throughout GHC, and "required by" might not be an accurate substitution in all cases.

Edited by NoidedSuper
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information