Add suggestions for unrecognised pragmas
[ This is what happens if you talk to too many people about about wanting to contribute to GHC during ZuriHac :) ]
Fixes #21589 (closed) by adding a new hint, SuggestCorrectPragmaName
, for suggesting possible corrections after a misspelled pragma (writing LNGUAGE
instead of LANGUAGE
, and the like).
This is not quite done, as I've never used alex and can't quite figure out how to do what I want, but I was assured by @sgraf812 that it's okay to post these WIP merge requests and ask for help.
TODOs:
-
Fix tests referring toAll of these have no possible suggestions, actually, so with !8451 (6040e130) this should be addressed.-Wunrecognised-pragmas
(likeparser/should_compile/read066
), after figuring out the lexer part (see the comment below) as they now include more information.
R.e. some of the bullet point from the template:
have commit messages which describe what they do (referring to [Notes][notes] and tickets using
#NNNN
syntax when appropriate)
I have added the fact that this closes #21589 (closed) to the commit description instead, but can of course change that and add it to the commit message directly if desired.