Unrecognised pragma warning could offer suggestions
It would be nice if the "Unrecognised pragma" warning offered suggestions where there are recognised pragmas with a similar spelling. (Compare misspelled variables, for example, where GHC reports "Perhaps you meant one of these...")
For example, given this module:
{-# LANGAUGE BangPatterns #-}
main = pure ()
GHC reports:
$ ghc-9.2.2 UnrecognisedPragma.hs
[1 of 1] Compiling Main ( UnrecognisedPragma.hs, UnrecognisedPragma.o )
UnrecognisedPragma.hs:1:1: warning: [-Wunrecognised-pragmas]
Unrecognised pragma
|
1 | {-# LANGAUGE BangPatterns #-}
| ^^^
but it would be nice to see something like:
UnrecognisedPragma.hs:1:1: warning: [-Wunrecognised-pragmas]
Unrecognised pragma 'LANGAUGE'.
Perhaps you meant 'LANGUAGE'?
|
1 | {-# LANGAUGE BangPatterns #-}
| ^^^