Pattern synonym parse error should recommend enabling extension
|Reported by:||agibiansky||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
Currently, if you try to use pattern synonyms in a module without -XPatternSynonyms, you can get a very uninformative parse error. For example:
module X where import Data.Text (pattern Y) x = 3
Yields, when compiled on GHC 7.10,
test.hs:3:27: parse error on input "Y"
It would be helpful if in addition to the error, the message suggested to the user to enable the PatternSynonyms extension, as many other error messages already do.