summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-06-28 15:42:57 +0200
committerAlfredo Di Napoli <alfredo@well-typed.com>2021-07-12 14:19:22 +0200
commita181313e9205fe289bedf6c8931eb2933490625c (patch)
tree19cb046c6fdba62f1987b49b5f6ec2821f438591 /testsuite
parentc38bce737f532cec1d863d3e15bed4a8addbffd1 (diff)
downloadhaskell-a181313e9205fe289bedf6c8931eb2933490625c.tar.gz
Add proper GHCHints for most PsMessage constructorswip/adinapoli-issue-20055
This commit adds proper hints to most diagnostic types in the `GHC.Parser.Errors.Types` module. By "proper" we mean that previous to this commit the hints were bundled together with the diagnostic message, whereas now we moved most of them as proper `[GhcHint]` in the implementation of `diagnosticHints`. More specifically, this is the list of constructors which now has proper hints: * PsErrIllegalBangPattern * PsWarnOperatorWhitespaceExtConflict * PsErrLambdaCase * PsErrIllegalPatSynExport * PsWarnOperatorWhitespace * PsErrMultiWayIf * PsErrIllegalQualifiedDo * PsErrNumUnderscores * PsErrLinearFunction * PsErrIllegalTraditionalRecordSyntax * PsErrIllegalExplicitNamespace * PsErrOverloadedRecordUpdateNotEnabled * PsErrIllegalDataTypeContext * PsErrSemiColonsInCondExpr * PsErrSemiColonsInCondCmd * PsWarnStarIsType * PsWarnImportPreQualified * PsErrImportPostQualified * PsErrEmptyDoubleQuotes * PsErrIllegalRoleName * PsWarnStarBinder For some reason, this patch increases the peak_megabyte_allocated of the T11545 test to 90 (from a baseline of 80) but that particular test doesn't emit any parsing diagnostic or hint and the metric increase happens only for the `aarch64-linux-deb10`. Metric Increase: T11545
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/count-deps/CountDepsAst.stdout3
-rw-r--r--testsuite/tests/count-deps/CountDepsParser.stdout3
-rw-r--r--testsuite/tests/linear/should_fail/LinearNoExt.stderr3
-rw-r--r--testsuite/tests/linear/should_fail/LinearNoExtU.stderr3
-rw-r--r--testsuite/tests/module/mod182.stderr5
-rw-r--r--testsuite/tests/module/mod184.stderr5
-rw-r--r--testsuite/tests/module/mod98.stderr3
-rw-r--r--testsuite/tests/parser/should_compile/T18834a.stderr6
-rw-r--r--testsuite/tests/parser/should_compile/T18834b.stderr6
-rw-r--r--testsuite/tests/parser/should_fail/NoDoAndIfThenElse.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/NoNumericUnderscores0.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/NoNumericUnderscores1.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/ParserNoMultiWayIf.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/T13450TH.stderr5
-rw-r--r--testsuite/tests/parser/should_fail/T14588.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/T16270.stderr30
-rw-r--r--testsuite/tests/parser/should_fail/T16270h.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/T17162.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/T3811.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/T3811e.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/proposal-229c.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/readFail031.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/readFailTraditionalRecords1.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/readFailTraditionalRecords2.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/readFailTraditionalRecords3.stderr3
-rw-r--r--testsuite/tests/patsyn/should_fail/export-syntax.stderr3
-rw-r--r--testsuite/tests/qualifieddo/should_fail/qdofail002.stderr4
-rw-r--r--testsuite/tests/roles/should_fail/Roles7.stderr2
-rw-r--r--testsuite/tests/warnings/should_compile/StarBinder.stderr6
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr2
33 files changed, 86 insertions, 53 deletions
diff --git a/testsuite/tests/count-deps/CountDepsAst.stdout b/testsuite/tests/count-deps/CountDepsAst.stdout
index 862040292f..e9ee86cf09 100644
--- a/testsuite/tests/count-deps/CountDepsAst.stdout
+++ b/testsuite/tests/count-deps/CountDepsAst.stdout
@@ -1,4 +1,4 @@
-Found 272 Language.Haskell.Syntax module dependencies
+Found 273 Language.Haskell.Syntax module dependencies
GHC.Builtin.Names
GHC.Builtin.PrimOps
GHC.Builtin.Types
@@ -122,6 +122,7 @@ GHC.Iface.Syntax
GHC.Iface.Type
GHC.Linker.Types
GHC.Parser.Annotation
+GHC.Parser.Errors.Basic
GHC.Parser.Errors.Ppr
GHC.Parser.Errors.Types
GHC.Parser.Types
diff --git a/testsuite/tests/count-deps/CountDepsParser.stdout b/testsuite/tests/count-deps/CountDepsParser.stdout
index 06579d319b..daaf8294a1 100644
--- a/testsuite/tests/count-deps/CountDepsParser.stdout
+++ b/testsuite/tests/count-deps/CountDepsParser.stdout
@@ -1,4 +1,4 @@
-Found 278 GHC.Parser module dependencies
+Found 279 GHC.Parser module dependencies
GHC.Builtin.Names
GHC.Builtin.PrimOps
GHC.Builtin.Types
@@ -125,6 +125,7 @@ GHC.Linker.Types
GHC.Parser
GHC.Parser.Annotation
GHC.Parser.CharClass
+GHC.Parser.Errors.Basic
GHC.Parser.Errors.Ppr
GHC.Parser.Errors.Types
GHC.Parser.Lexer
diff --git a/testsuite/tests/linear/should_fail/LinearNoExt.stderr b/testsuite/tests/linear/should_fail/LinearNoExt.stderr
index e4afbd1048..6bcb5425ed 100644
--- a/testsuite/tests/linear/should_fail/LinearNoExt.stderr
+++ b/testsuite/tests/linear/should_fail/LinearNoExt.stderr
@@ -1,3 +1,4 @@
LinearNoExt.hs:3:14: error:
- Enable LinearTypes to allow linear functions
+ Illegal use of linear functions
+ Suggested fix: Perhaps you intended to use LinearTypes
diff --git a/testsuite/tests/linear/should_fail/LinearNoExtU.stderr b/testsuite/tests/linear/should_fail/LinearNoExtU.stderr
index ac187aee4a..4c6e3a9065 100644
--- a/testsuite/tests/linear/should_fail/LinearNoExtU.stderr
+++ b/testsuite/tests/linear/should_fail/LinearNoExtU.stderr
@@ -1,3 +1,4 @@
LinearNoExtU.hs:4:14: error:
- Enable LinearTypes to allow linear functions
+ Illegal use of linear functions
+ Suggested fix: Perhaps you intended to use LinearTypes
diff --git a/testsuite/tests/module/mod182.stderr b/testsuite/tests/module/mod182.stderr
index 51886000de..437b080d48 100644
--- a/testsuite/tests/module/mod182.stderr
+++ b/testsuite/tests/module/mod182.stderr
@@ -1,4 +1,5 @@
mod182.hs:6:16: error:
- Found ‘qualified’ in postpositive position.
- To allow this, enable language extension 'ImportQualifiedPost'
+ Found ‘qualified’ in postpositive position.
+ Suggested fix:
+ Perhaps you intended to use ImportQualifiedPost
diff --git a/testsuite/tests/module/mod184.stderr b/testsuite/tests/module/mod184.stderr
index 8fe888c028..d83a316d18 100644
--- a/testsuite/tests/module/mod184.stderr
+++ b/testsuite/tests/module/mod184.stderr
@@ -1,5 +1,6 @@
mod184.hs:6:8: warning: [-Wprepositive-qualified-module]
Found ‘qualified’ in prepositive position
- Suggested fix: place ‘qualified’ after the module name instead.
- To allow this, enable language extension 'ImportQualifiedPost'
+ Suggested fixes:
+ Place ‘qualified’ after the module name.
+ Perhaps you intended to use ImportQualifiedPost
diff --git a/testsuite/tests/module/mod98.stderr b/testsuite/tests/module/mod98.stderr
index b104cdae72..7af91a8775 100644
--- a/testsuite/tests/module/mod98.stderr
+++ b/testsuite/tests/module/mod98.stderr
@@ -1,4 +1,5 @@
mod98.hs:3:1: error:
Invalid type signature: M.x :: ...
- Should be of form <variables> :: <type>
+ Suggested fix:
+ A type signature should be of form <variables> :: <type>
diff --git a/testsuite/tests/parser/should_compile/T18834a.stderr b/testsuite/tests/parser/should_compile/T18834a.stderr
index 2fd8f5903d..71f90eff49 100644
--- a/testsuite/tests/parser/should_compile/T18834a.stderr
+++ b/testsuite/tests/parser/should_compile/T18834a.stderr
@@ -2,14 +2,14 @@
T18834a.hs:6:10: warning: [-Woperator-whitespace-ext-conflict (in -Wdefault)]
The prefix use of a ‘$’ would denote an untyped splice
were the TemplateHaskell extension enabled.
- Suggested fix: add whitespace after the ‘$’.
+ Suggested fix: Add whitespace after the ‘$’.
T18834a.hs:7:10: warning: [-Woperator-whitespace-ext-conflict (in -Wdefault)]
The prefix use of a ‘$$’ would denote a typed splice
were the TemplateHaskell extension enabled.
- Suggested fix: add whitespace after the ‘$$’.
+ Suggested fix: Add whitespace after the ‘$$’.
T18834a.hs:8:10: warning: [-Woperator-whitespace-ext-conflict (in -Wdefault)]
The prefix use of a ‘%’ would denote a multiplicity annotation
were the LinearTypes extension enabled.
- Suggested fix: add whitespace after the ‘%’.
+ Suggested fix: Add whitespace after the ‘%’.
diff --git a/testsuite/tests/parser/should_compile/T18834b.stderr b/testsuite/tests/parser/should_compile/T18834b.stderr
index 9ec4f81bb4..4dc54cfb26 100644
--- a/testsuite/tests/parser/should_compile/T18834b.stderr
+++ b/testsuite/tests/parser/should_compile/T18834b.stderr
@@ -2,14 +2,14 @@
T18834b.hs:5:10: warning: [-Woperator-whitespace]
The suffix use of a ‘+’ might be repurposed as special syntax
by a future language extension.
- Suggested fix: add whitespace around it.
+ Suggested fix: Add whitespace around ‘+’.
T18834b.hs:6:11: warning: [-Woperator-whitespace]
The prefix use of a ‘+’ might be repurposed as special syntax
by a future language extension.
- Suggested fix: add whitespace around it.
+ Suggested fix: Add whitespace around ‘+’.
T18834b.hs:7:10: warning: [-Woperator-whitespace]
The tight infix use of a ‘+’ might be repurposed as special syntax
by a future language extension.
- Suggested fix: add whitespace around it.
+ Suggested fix: Add whitespace around ‘+’.
diff --git a/testsuite/tests/parser/should_fail/NoDoAndIfThenElse.stderr b/testsuite/tests/parser/should_fail/NoDoAndIfThenElse.stderr
index 6c96fc9679..26b8d8c617 100644
--- a/testsuite/tests/parser/should_fail/NoDoAndIfThenElse.stderr
+++ b/testsuite/tests/parser/should_fail/NoDoAndIfThenElse.stderr
@@ -2,4 +2,4 @@
NoDoAndIfThenElse.hs:7:13:
Unexpected semi-colons in conditional:
if True; then return (); else return ()
- Perhaps you meant to use DoAndIfThenElse?
+ Suggested fix: Perhaps you intended to use DoAndIfThenElse
diff --git a/testsuite/tests/parser/should_fail/NoNumericUnderscores0.stderr b/testsuite/tests/parser/should_fail/NoNumericUnderscores0.stderr
index af59581c14..ffe4a3f1dc 100644
--- a/testsuite/tests/parser/should_fail/NoNumericUnderscores0.stderr
+++ b/testsuite/tests/parser/should_fail/NoNumericUnderscores0.stderr
@@ -1,3 +1,4 @@
NoNumericUnderscores0.hs:11:3: error:
- Use NumericUnderscores to allow underscores in integer literals
+ Illegal underscores in integer literals
+ Suggested fix: Perhaps you intended to use NumericUnderscores
diff --git a/testsuite/tests/parser/should_fail/NoNumericUnderscores1.stderr b/testsuite/tests/parser/should_fail/NoNumericUnderscores1.stderr
index 0dfbaa409e..242d10f22b 100644
--- a/testsuite/tests/parser/should_fail/NoNumericUnderscores1.stderr
+++ b/testsuite/tests/parser/should_fail/NoNumericUnderscores1.stderr
@@ -1,3 +1,4 @@
NoNumericUnderscores1.hs:11:3: error:
- Use NumericUnderscores to allow underscores in floating literals
+ Illegal underscores in floating literals
+ Suggested fix: Perhaps you intended to use NumericUnderscores
diff --git a/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr b/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr
index b4ca84e3b3..1785a14fc2 100644
--- a/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr
+++ b/testsuite/tests/parser/should_fail/NoPatternSynonyms.stderr
@@ -1,4 +1,4 @@
NoPatternSynonyms.hs:3:1: error:
Invalid type signature: pattern P :: ...
- Perhaps you meant to use PatternSynonyms?
+ Suggested fix: Perhaps you intended to use PatternSynonyms
diff --git a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr
index 601262c360..df4cb72d0f 100644
--- a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr
+++ b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr
@@ -1,2 +1,3 @@
ParserNoLambdaCase.hs:3:6:
- Illegal lambda-case (use LambdaCase)
+ Illegal lambda-case
+ Suggested fix: Perhaps you intended to use LambdaCase
diff --git a/testsuite/tests/parser/should_fail/ParserNoMultiWayIf.stderr b/testsuite/tests/parser/should_fail/ParserNoMultiWayIf.stderr
index 64d70520b0..22258fa51c 100644
--- a/testsuite/tests/parser/should_fail/ParserNoMultiWayIf.stderr
+++ b/testsuite/tests/parser/should_fail/ParserNoMultiWayIf.stderr
@@ -1,3 +1,4 @@
ParserNoMultiWayIf.hs:4:5:
- Multi-way if-expressions need MultiWayIf turned on
+ Illegal multi-way if-expression
+ Suggested fix: Perhaps you intended to use MultiWayIf
diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.stderr b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.stderr
index 5430e37bc9..430bb53a5e 100644
--- a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.stderr
+++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.stderr
@@ -1,2 +1,3 @@
RecordDotSyntaxFail2.hs:10:10:
- OverloadedRecordUpdate needs to be enabled
+ Illegal overloaded record update
+ Suggested fix: Perhaps you intended to use OverloadedRecordUpdate
diff --git a/testsuite/tests/parser/should_fail/T13450TH.stderr b/testsuite/tests/parser/should_fail/T13450TH.stderr
index 11733c5c91..1d6fdfbb1a 100644
--- a/testsuite/tests/parser/should_fail/T13450TH.stderr
+++ b/testsuite/tests/parser/should_fail/T13450TH.stderr
@@ -2,5 +2,6 @@
T13450TH.hs:6:15: error:
Parser error on `''`
Character literals may not be empty
- Or perhaps you intended to use quotation syntax of TemplateHaskell,
- but the type variable or constructor is missing
+ Suggested fix:
+ Perhaps you intended to use quotation syntax of TemplateHaskell,
+ but the type variable or constructor is missing
diff --git a/testsuite/tests/parser/should_fail/T14588.stderr b/testsuite/tests/parser/should_fail/T14588.stderr
index d4bf505703..04e4478198 100644
--- a/testsuite/tests/parser/should_fail/T14588.stderr
+++ b/testsuite/tests/parser/should_fail/T14588.stderr
@@ -1,4 +1,5 @@
T14588.hs:4:19: error:
- Illegal bang-pattern (use BangPatterns):
+ Illegal bang-pattern
!x
+ Suggested fix: Perhaps you intended to use BangPatterns
diff --git a/testsuite/tests/parser/should_fail/T16270.stderr b/testsuite/tests/parser/should_fail/T16270.stderr
index 40a986879e..578add9682 100644
--- a/testsuite/tests/parser/should_fail/T16270.stderr
+++ b/testsuite/tests/parser/should_fail/T16270.stderr
@@ -9,7 +9,7 @@ T16270.hs:8:1: warning: [-Wtabs (in -Wdefault)]
T16270.hs:8:12: error:
Unexpected semi-colons in conditional:
if c then False; else True
- Perhaps you meant to use DoAndIfThenElse?
+ Suggested fix: Perhaps you intended to use DoAndIfThenElse
T16270.hs:13:8: error:
Unexpected do block in function application:
@@ -26,12 +26,14 @@ T16270.hs:14:8: error:
Perhaps you intended to use BlockArguments
T16270.hs:18:22: error:
- Illegal record syntax (use TraditionalRecordSyntax): {fst :: a,
- snd :: b}
+ Illegal record syntax: {fst :: a,
+ snd :: b}
+ Suggested fix: Perhaps you intended to use TraditionalRecordSyntax
T16270.hs:19:5: error:
- Illegal record syntax (use TraditionalRecordSyntax): p {fst = 1,
- snd = True}
+ Illegal record syntax: p {fst = 1,
+ snd = True}
+ Suggested fix: Perhaps you intended to use TraditionalRecordSyntax
T16270.hs:21:6: error:
Illegal symbol ‘forall’ in type
@@ -41,7 +43,7 @@ T16270.hs:21:6: error:
T16270.hs:22:8: error:
Unexpected semi-colons in conditional:
if True; then (); else ()
- Perhaps you meant to use DoAndIfThenElse?
+ Suggested fix: Perhaps you intended to use DoAndIfThenElse
T16270.hs:24:10: error:
Illegal keyword 'where' in data declaration
@@ -49,19 +51,25 @@ T16270.hs:24:10: error:
extension to enable syntax: data T where
T16270.hs:26:12: error:
- Illegal bang-pattern (use BangPatterns):
+ Illegal bang-pattern
!i
+ Suggested fix: Perhaps you intended to use BangPatterns
T16270.hs:28:9: error:
- Multi-way if-expressions need MultiWayIf turned on
+ Illegal multi-way if-expression
+ Suggested fix: Perhaps you intended to use MultiWayIf
T16270.hs:30:9: error:
- Multi-way if-expressions need MultiWayIf turned on
+ Illegal multi-way if-expression
+ Suggested fix: Perhaps you intended to use MultiWayIf
-T16270.hs:33:6: error: Illegal lambda-case (use LambdaCase)
+T16270.hs:33:6:
+ Illegal lambda-case
+ Suggested fix: Perhaps you intended to use LambdaCase
T16270.hs:36:5: error:
- Use NumericUnderscores to allow underscores in integer literals
+ Illegal underscores in integer literals
+ Suggested fix: Perhaps you intended to use NumericUnderscores
T16270.hs:38:5: error:
primitive string literal must contain only characters <= '\xFF'
diff --git a/testsuite/tests/parser/should_fail/T16270h.stderr b/testsuite/tests/parser/should_fail/T16270h.stderr
index fb7fc43a17..f723d594da 100644
--- a/testsuite/tests/parser/should_fail/T16270h.stderr
+++ b/testsuite/tests/parser/should_fail/T16270h.stderr
@@ -1,6 +1,7 @@
T16270h.hs:8:22: error:
- Illegal keyword 'type' (use ExplicitNamespaces to enable)
+ Illegal keyword 'type'
+ Suggested fix: Perhaps you intended to use ExplicitNamespaces
T16270h.hs:10:8: error:
Parse error: ‘pkg?’
diff --git a/testsuite/tests/parser/should_fail/T17162.stderr b/testsuite/tests/parser/should_fail/T17162.stderr
index ff6cfb99c4..1eef0ea346 100644
--- a/testsuite/tests/parser/should_fail/T17162.stderr
+++ b/testsuite/tests/parser/should_fail/T17162.stderr
@@ -1,4 +1,5 @@
T17162.hs:7:21: error:
- Illegal bang-pattern (use BangPatterns):
+ Illegal bang-pattern
!enc
+ Suggested fix: Perhaps you intended to use BangPatterns
diff --git a/testsuite/tests/parser/should_fail/T3811.stderr b/testsuite/tests/parser/should_fail/T3811.stderr
index 90810949ed..f0209ba85f 100644
--- a/testsuite/tests/parser/should_fail/T3811.stderr
+++ b/testsuite/tests/parser/should_fail/T3811.stderr
@@ -1,4 +1,5 @@
T3811.hs:4:1: error:
Invalid type signature: f x :: ...
- Should be of form <variables> :: <type>
+ Suggested fix:
+ A type signature should be of form <variables> :: <type>
diff --git a/testsuite/tests/parser/should_fail/T3811e.stderr b/testsuite/tests/parser/should_fail/T3811e.stderr
index e98be9ffe6..10cd25f9e8 100644
--- a/testsuite/tests/parser/should_fail/T3811e.stderr
+++ b/testsuite/tests/parser/should_fail/T3811e.stderr
@@ -1,4 +1,4 @@
T3811e.hs:6:6:
- Illegal datatype context (use DatatypeContexts): (Show a,
- Read a) =>
+ Illegal datatype context: (Show a, Read a) =>
+ Suggested fix: Perhaps you intended to use DatatypeContexts
diff --git a/testsuite/tests/parser/should_fail/proposal-229c.stderr b/testsuite/tests/parser/should_fail/proposal-229c.stderr
index 965801a3c3..47753c88dd 100644
--- a/testsuite/tests/parser/should_fail/proposal-229c.stderr
+++ b/testsuite/tests/parser/should_fail/proposal-229c.stderr
@@ -1,4 +1,5 @@
proposal-229c.hs:6:3: error:
- Illegal bang-pattern (use BangPatterns):
+ Illegal bang-pattern
!x
+ Suggested fix: Perhaps you intended to use BangPatterns
diff --git a/testsuite/tests/parser/should_fail/readFail031.stderr b/testsuite/tests/parser/should_fail/readFail031.stderr
index 5239948bf8..eaf9058c72 100644
--- a/testsuite/tests/parser/should_fail/readFail031.stderr
+++ b/testsuite/tests/parser/should_fail/readFail031.stderr
@@ -1,4 +1,5 @@
readFail031.hs:4:3: error:
Invalid type signature: (:+) :: ...
- Should be of form <variables> :: <type>
+ Suggested fix:
+ A type signature should be of form <variables> :: <type>
diff --git a/testsuite/tests/parser/should_fail/readFailTraditionalRecords1.stderr b/testsuite/tests/parser/should_fail/readFailTraditionalRecords1.stderr
index 34cda9c264..9a8ed3ae84 100644
--- a/testsuite/tests/parser/should_fail/readFailTraditionalRecords1.stderr
+++ b/testsuite/tests/parser/should_fail/readFailTraditionalRecords1.stderr
@@ -1,3 +1,4 @@
readFailTraditionalRecords1.hs:6:16:
- Illegal record syntax (use TraditionalRecordSyntax): {i :: Int}
+ Illegal record syntax: {i :: Int}
+ Suggested fix: Perhaps you intended to use TraditionalRecordSyntax
diff --git a/testsuite/tests/parser/should_fail/readFailTraditionalRecords2.stderr b/testsuite/tests/parser/should_fail/readFailTraditionalRecords2.stderr
index 771b345a70..91f9a590b0 100644
--- a/testsuite/tests/parser/should_fail/readFailTraditionalRecords2.stderr
+++ b/testsuite/tests/parser/should_fail/readFailTraditionalRecords2.stderr
@@ -1,3 +1,4 @@
readFailTraditionalRecords2.hs:6:4:
- Illegal record syntax (use TraditionalRecordSyntax): Foo {i = j}
+ Illegal record syntax: Foo {i = j}
+ Suggested fix: Perhaps you intended to use TraditionalRecordSyntax
diff --git a/testsuite/tests/parser/should_fail/readFailTraditionalRecords3.stderr b/testsuite/tests/parser/should_fail/readFailTraditionalRecords3.stderr
index 0317935c0b..b741512b3b 100644
--- a/testsuite/tests/parser/should_fail/readFailTraditionalRecords3.stderr
+++ b/testsuite/tests/parser/should_fail/readFailTraditionalRecords3.stderr
@@ -1,3 +1,4 @@
readFailTraditionalRecords3.hs:6:7:
- Illegal record syntax (use TraditionalRecordSyntax): x {i = 3}
+ Illegal record syntax: x {i = 3}
+ Suggested fix: Perhaps you intended to use TraditionalRecordSyntax
diff --git a/testsuite/tests/patsyn/should_fail/export-syntax.stderr b/testsuite/tests/patsyn/should_fail/export-syntax.stderr
index 8843a6a395..35858bce0d 100644
--- a/testsuite/tests/patsyn/should_fail/export-syntax.stderr
+++ b/testsuite/tests/patsyn/should_fail/export-syntax.stderr
@@ -1,3 +1,4 @@
export-syntax.hs:1:12: error:
- Illegal export form (use PatternSynonyms to enable)
+ Illegal export form
+ Suggested fix: Perhaps you intended to use PatternSynonyms
diff --git a/testsuite/tests/qualifieddo/should_fail/qdofail002.stderr b/testsuite/tests/qualifieddo/should_fail/qdofail002.stderr
index 5948678eb8..bea64513c6 100644
--- a/testsuite/tests/qualifieddo/should_fail/qdofail002.stderr
+++ b/testsuite/tests/qualifieddo/should_fail/qdofail002.stderr
@@ -1,8 +1,8 @@
qdofail002.hs:8:11:
Illegal qualified ‘P.do’ block
- Perhaps you intended to use QualifiedDo
+ Suggested fix: Perhaps you intended to use QualifiedDo
qdofail002.hs:11:13:
Illegal qualified ‘P.mdo’ block
- Perhaps you intended to use QualifiedDo
+ Suggested fix: Perhaps you intended to use QualifiedDo
diff --git a/testsuite/tests/roles/should_fail/Roles7.stderr b/testsuite/tests/roles/should_fail/Roles7.stderr
index ae62543e28..c8840136d7 100644
--- a/testsuite/tests/roles/should_fail/Roles7.stderr
+++ b/testsuite/tests/roles/should_fail/Roles7.stderr
@@ -1,4 +1,4 @@
Roles7.hs:6:15:
Illegal role name ‘repesentational’
- Perhaps you meant ‘representational’
+ Suggested fix: Perhaps you meant ‘representational’
diff --git a/testsuite/tests/warnings/should_compile/StarBinder.stderr b/testsuite/tests/warnings/should_compile/StarBinder.stderr
index a8bdc9b6e5..64bd8a3fbc 100644
--- a/testsuite/tests/warnings/should_compile/StarBinder.stderr
+++ b/testsuite/tests/warnings/should_compile/StarBinder.stderr
@@ -1,10 +1,12 @@
StarBinder.hs:6:14: warning: [-Wstar-binder (in -Wdefault)]
Found binding occurrence of ‘*’ yet StarIsType is enabled.
- NB. To use (or export) this operator in modules with StarIsType,
+ Suggested fix:
+ To use (or export) this operator in modules with StarIsType,
including the definition module, you must qualify it.
StarBinder.hs:6:30: warning: [-Wstar-binder (in -Wdefault)]
Found binding occurrence of ‘*’ yet StarIsType is enabled.
- NB. To use (or export) this operator in modules with StarIsType,
+ Suggested fix:
+ To use (or export) this operator in modules with StarIsType,
including the definition module, you must qualify it.
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
index 6c3555797d..1b3c2ff34b 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
@@ -20,4 +20,4 @@ Template.hs:20:15: warning: [-Wstar-is-type (in -Wall, -Wcompat)]
Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’
relies on the StarIsType extension, which will become
deprecated in the future.
- Suggested fix: use ‘Type’ from ‘Data.Kind’ instead.
+ Suggested fix: Use ‘Type’ from ‘Data.Kind’ instead.