[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-mode 5b54d4b52b 1/4: Fix #1834: remove bad regex t
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-mode 5b54d4b52b 1/4: Fix #1834: remove bad regex that was supposed to recognize a LANGUAGE suggestion |
Date: |
Tue, 16 Jan 2024 13:00:15 -0500 (EST) |
branch: elpa/haskell-mode
commit 5b54d4b52bc7b1f594a6ce0977d8fb3d9235eee0
Author: Andreas Abel <andreas.abel@ifi.lmu.de>
Commit: Andreas Abel <andreas.abel@ifi.lmu.de>
Fix #1834: remove bad regex that was supposed to recognize a LANGUAGE
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.
---
haskell-load.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/haskell-load.el b/haskell-load.el
index 230d8f608a..c782dd0855 100644
--- a/haskell-load.el
+++ b/haskell-load.el
@@ -205,7 +205,13 @@ list of modules where missed IDENT was found."
(string-match
"Use \\([A-Z][A-Za-z]+\\) if you want to disable this"
msg)
- (string-match "use \\([A-Z][A-Za-z]+\\)" msg)
+ ;; Andreas Abel, 2024-01-10,
https://github.com/haskell/haskell-mode/issues/1834
+ ;; The following regex also matches the new x-partial warning
+ ;; "Consider refactoring to use Data.List.NonEmpty"
+ ;; which would result in a suggestion to
+ ;; "Add {-# LANGUAGE Data #-} to the top of the file?"
+ ;; Thus, we disable it.
+ ;; (string-match "use \\([A-Z][A-Za-z]+\\)" msg)
(string-match "You need \\([A-Z][A-Za-z]+\\)" msg)))
(when haskell-process-suggest-language-pragmas
(haskell-process-suggest-pragma