[Git][ghc/ghc][master] Reword error resulting from missing -XBangPatterns.
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu May 30 07:01:24 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00
Reword error resulting from missing -XBangPatterns.
It can be the result of either a bang pattern or strict binding,
so now we say so instead of claiming it must be a bang pattern.
Fixes #21032
- - - - -
5 changed files:
- compiler/GHC/Parser/Errors/Ppr.hs
- testsuite/tests/parser/should_fail/T14588.stderr
- testsuite/tests/parser/should_fail/T16270.stderr
- testsuite/tests/parser/should_fail/T17162.stderr
- testsuite/tests/parser/should_fail/proposal-229c.stderr
Changes:
=====================================
compiler/GHC/Parser/Errors/Ppr.hs
=====================================
@@ -202,7 +202,7 @@ instance Diagnostic PsMessage where
NumUnderscore_Integral -> "Illegal underscores in integer literals"
NumUnderscore_Float -> "Illegal underscores in floating literals"
PsErrIllegalBangPattern e
- -> mkSimpleDecorated $ text "Illegal bang-pattern" $$ ppr e
+ -> mkSimpleDecorated $ text "Illegal bang-pattern or strict binding" $$ ppr e
PsErrOverloadedRecordDotInvalid
-> mkSimpleDecorated $
text "Use of OverloadedRecordDot '.' not valid ('.' isn't allowed when constructing records or in record patterns)"
=====================================
testsuite/tests/parser/should_fail/T14588.stderr
=====================================
@@ -1,6 +1,6 @@
-
T14588.hs:4:19: error: [GHC-79767]
- Illegal bang-pattern
+ Illegal bang-pattern or strict binding
!x
Suggested fix:
Perhaps you intended to use the ‘BangPatterns’ extension
+
=====================================
testsuite/tests/parser/should_fail/T16270.stderr
=====================================
@@ -1,4 +1,3 @@
-
T16270.hs:3:13: warning: [GHC-53692] [-Wdeprecated-flags (in -Wdefault)]
-Werror=missing-space-after-bang is deprecated: bang patterns can no longer be written with a space
@@ -57,7 +56,7 @@ T16270.hs:24:10: error: [GHC-36952]
to enable syntax: data T where
T16270.hs:26:12: error: [GHC-79767]
- Illegal bang-pattern
+ Illegal bang-pattern or strict binding
!i
Suggested fix:
Perhaps you intended to use the ‘BangPatterns’ extension
@@ -90,3 +89,4 @@ T16270.hs:40:7: error: [GHC-71614]
T16270.hs:46:1: error: [GHC-58481]
parse error (possibly incorrect indentation or mismatched brackets)
+
=====================================
testsuite/tests/parser/should_fail/T17162.stderr
=====================================
@@ -1,6 +1,6 @@
-
T17162.hs:7:21: error: [GHC-79767]
- Illegal bang-pattern
+ Illegal bang-pattern or strict binding
!enc
Suggested fix:
Perhaps you intended to use the ‘BangPatterns’ extension
+
=====================================
testsuite/tests/parser/should_fail/proposal-229c.stderr
=====================================
@@ -1,6 +1,6 @@
-
proposal-229c.hs:6:3: error: [GHC-79767]
- Illegal bang-pattern
+ Illegal bang-pattern or strict binding
!x
Suggested fix:
Perhaps you intended to use the ‘BangPatterns’ extension
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/45a4a5f34aaadf8fa96f286ede71ede9f67fb022
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/45a4a5f34aaadf8fa96f286ede71ede9f67fb022
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240530/8c754806/attachment-0001.html>
More information about the ghc-commits
mailing list