-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add {-# LANGUAGE Data #-} to the top of the file? (y or n) #1834
Comments
Seems to be originating from here: Lines 210 to 215 in 79eaf44
It does not seem to limit suggestion to valid pragmas, the name of the pragma is here obtained by (match-string 1 msg) , maybe coming from this match: Lines 199 to 209 in 79eaf44
Ah, I guess this is thanks to our wonderful new
In the
Can you spot which regex matches here and extracts a |
… suggestion Remove bad regex that was supposed to recognize a LANGUAGE suggestion. This regex fires unfortunately on GHC 9.8's new `x-partial` warning, destroying the UX with obnoxious questions whether to "add LANGUAGE Data". Closes #1834.
In PR #1834 this issue is fixed by removing the bad regex. |
Fix #1834: remove bad regex that was supposed to recognize a LANGUAGE suggestion
When I load a hs file without project (cabal or stack) I get asked
This question can be repeated several times in a row, regardless whether I answer y or n.
Each time I answer y the
{-# LANGUAGE Data #-}
line will be added (which does not make any sense since LANGUAGE pragmas are idempotent).The
Data
extension isn't even listed here: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/table.htmlI don't know what purpose it should serve.
I just upgraded to the latest version of
haskell-mode
(v20231115) but the problem persists.The text was updated successfully, but these errors were encountered: