Warn about possible missing -XScopedTypeVariables on errors.
|Reported by:||Aninhumer||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Revisions:|
Suggest that the user they may wish to add -XScopedTypeVariables, if an error results from a free type variable which would be bound in its scope with the flag enabled. (i.e. if its name exists as a variable in the type declaration).
I ran into this problem on code similar to this:
instance (Sized a n, Nat n) => Rep a where emptyRep = replicate (toInt (undefined :: n)) 0
and it took me some time to solve, and only by having vague knowledge that such a flag existed.