summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorHaskell-mouse <rinat.stryungis@serokell.io>2023-04-03 14:03:06 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-03 19:31:26 -0400
commit8b092910ac18a2b5dc97a29ced9fc469c663a03b (patch)
tree80c1d763922a2fbf9e343ac6cbc2cf6de35c5c0a /testsuite
parenta8e36892689bd6b8fb472844f79aeeddeda92e0a (diff)
downloadhaskell-8b092910ac18a2b5dc97a29ced9fc469c663a03b.tar.gz
Convert diagnostics in GHC.Rename.HsType to proper TcRnMessage
I've turned all occurrences of TcRnUnknownMessage in GHC.Rename.HsType module into a proper TcRnMessage. Instead, these TcRnMessage messages were introduced: TcRnDataKindsError TcRnUnusedQuantifiedTypeVar TcRnIllegalKindSignature TcRnUnexpectedPatSigType TcRnSectionPrecedenceError TcRnPrecedenceParsingError TcRnIllegalKind TcRnNegativeNumTypeLiteral TcRnUnexpectedKindVar TcRnBindMultipleVariables TcRnBindVarAlreadyInScope
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/linear/should_fail/T18888.stderr5
-rw-r--r--testsuite/tests/module/mod61.stderr2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/readFail016.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/readFail023.stderr2
-rw-r--r--testsuite/tests/polykinds/BadKindVar.stderr4
-rw-r--r--testsuite/tests/polykinds/T14710.stderr24
-rw-r--r--testsuite/tests/polykinds/T16762b.stderr5
-rw-r--r--testsuite/tests/polykinds/T7151.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/ExplicitForAllRules1.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T5331.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/T11663.stderr12
-rw-r--r--testsuite/tests/rename/should_fail/rnfail017.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail019.stderr2
-rw-r--r--testsuite/tests/saks/should_fail/T16722.stderr4
-rw-r--r--testsuite/tests/th/T8412.stderr2
-rw-r--r--testsuite/tests/th/TH_Promoted1Tuple.stderr5
-rw-r--r--testsuite/tests/th/TH_unresolvedInfix2.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T18252a.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T8306.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiAppPat.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiPat.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearSinglePat.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/TyAppPat_ScopedTyVarConflict.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail094.stderr5
26 files changed, 62 insertions, 53 deletions
diff --git a/testsuite/tests/linear/should_fail/T18888.stderr b/testsuite/tests/linear/should_fail/T18888.stderr
index c224a5b331..aa2032db1d 100644
--- a/testsuite/tests/linear/should_fail/T18888.stderr
+++ b/testsuite/tests/linear/should_fail/T18888.stderr
@@ -1,3 +1,4 @@
-T18888.hs:4:9:
- Illegal type: ‘001’ Perhaps you intended to use DataKinds
+T18888.hs:4:9: [GHC-68567]
+ Illegal type: ‘001’
+ Suggested fix: Perhaps you intended to use DataKinds \ No newline at end of file
diff --git a/testsuite/tests/module/mod61.stderr b/testsuite/tests/module/mod61.stderr
index cce1dfe611..0382f217ed 100644
--- a/testsuite/tests/module/mod61.stderr
+++ b/testsuite/tests/module/mod61.stderr
@@ -1,4 +1,4 @@
-mod61.hs:3:11:
+mod61.hs:3:11: [GHC-88747]
Precedence parsing error
cannot mix ‘==’ [infix 4] and ‘==’ [infix 4] in the same infix expression
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
index 462b00416c..11374466ec 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr
@@ -7,7 +7,7 @@ T13132_duplicaterecflds.hs:7:16: error:
or the field ‘runContT’ of record ‘ContT2’,
defined at T13132_duplicaterecflds.hs:5:33
-T13132_duplicaterecflds.hs:9:11: error:
+T13132_duplicaterecflds.hs:9:11: error: [GHC-46878]
The operator ‘runContT’ [infixl 9] of a section
must have lower precedence than that of the operand,
namely ‘y’ [infixl 9]
diff --git a/testsuite/tests/parser/should_fail/readFail016.stderr b/testsuite/tests/parser/should_fail/readFail016.stderr
index 33ccbed470..feb8942530 100644
--- a/testsuite/tests/parser/should_fail/readFail016.stderr
+++ b/testsuite/tests/parser/should_fail/readFail016.stderr
@@ -1,4 +1,4 @@
-readFail016.hs:7:1:
+readFail016.hs:7:1: [GHC-88747]
Precedence parsing error
cannot mix ‘|-’ [infix 6] and ‘:’ [infixr 5] in the same infix expression
diff --git a/testsuite/tests/parser/should_fail/readFail023.stderr b/testsuite/tests/parser/should_fail/readFail023.stderr
index 7c60be5108..7d28c3400d 100644
--- a/testsuite/tests/parser/should_fail/readFail023.stderr
+++ b/testsuite/tests/parser/should_fail/readFail023.stderr
@@ -1,5 +1,5 @@
-readFail023.hs:9:5:
+readFail023.hs:9:5: [GHC-46878]
The operator ‘**’ [infixl 7] of a section
must have lower precedence than that of the operand,
namely prefix `-' [infixl 6]
diff --git a/testsuite/tests/polykinds/BadKindVar.stderr b/testsuite/tests/polykinds/BadKindVar.stderr
index 19944a4df8..a0fcb59fd1 100644
--- a/testsuite/tests/polykinds/BadKindVar.stderr
+++ b/testsuite/tests/polykinds/BadKindVar.stderr
@@ -1,5 +1,5 @@
-BadKindVar.hs:9:21: error:
+BadKindVar.hs:9:21: error: [GHC-12875]
Unexpected kind variable ‘k’
- Perhaps you intended to use PolyKinds
In the type signature for ‘f’
+ Suggested fix: Perhaps you intended to use PolyKinds
diff --git a/testsuite/tests/polykinds/T14710.stderr b/testsuite/tests/polykinds/T14710.stderr
index fa83a74fc8..6fc8866af7 100644
--- a/testsuite/tests/polykinds/T14710.stderr
+++ b/testsuite/tests/polykinds/T14710.stderr
@@ -1,30 +1,30 @@
-T14710.hs:10:21: error:
+T14710.hs:10:21: error: [GHC-12875]
Unexpected kind variable ‘a’
- Perhaps you intended to use PolyKinds
In a class method signature for ‘c1’
+ Suggested fix: Perhaps you intended to use PolyKinds
-T14710.hs:11:22: error:
+T14710.hs:11:22: error: [GHC-12875]
Unexpected kind variable ‘a’
- Perhaps you intended to use PolyKinds
In a class method signature for ‘c2’
+ Suggested fix: Perhaps you intended to use PolyKinds
-T14710.hs:16:23: error:
+T14710.hs:16:23: error: [GHC-12875]
Unexpected kind variable ‘a’
- Perhaps you intended to use PolyKinds
In the type signature for ‘g1’
+ Suggested fix: Perhaps you intended to use PolyKinds
-T14710.hs:19:24: error:
+T14710.hs:19:24: error: [GHC-12875]
Unexpected kind variable ‘a’
- Perhaps you intended to use PolyKinds
In the type signature for ‘g2’
+ Suggested fix: Perhaps you intended to use PolyKinds
-T14710.hs:22:31: error:
+T14710.hs:22:31: error: [GHC-12875]
Unexpected kind variable ‘k’
- Perhaps you intended to use PolyKinds
In the type signature for ‘h1’
+ Suggested fix: Perhaps you intended to use PolyKinds
-T14710.hs:25:22: error:
+T14710.hs:25:22: error: [GHC-12875]
Unexpected kind variable ‘k’
- Perhaps you intended to use PolyKinds
In the type signature for ‘h2’
+ Suggested fix: Perhaps you intended to use PolyKinds
diff --git a/testsuite/tests/polykinds/T16762b.stderr b/testsuite/tests/polykinds/T16762b.stderr
index 3da5c88856..e77f332f17 100644
--- a/testsuite/tests/polykinds/T16762b.stderr
+++ b/testsuite/tests/polykinds/T16762b.stderr
@@ -1,4 +1,5 @@
-T16762b.hs:8:11: error:
+T16762b.hs:8:11: error: [GHC-64861]
Illegal kind: forall k. Type
- Did you mean to enable PolyKinds?
+ Suggested fix: Perhaps you intended to use PolyKinds
+
diff --git a/testsuite/tests/polykinds/T7151.stderr b/testsuite/tests/polykinds/T7151.stderr
index 8b9ff9040e..71a39d2c4f 100644
--- a/testsuite/tests/polykinds/T7151.stderr
+++ b/testsuite/tests/polykinds/T7151.stderr
@@ -1,4 +1,4 @@
-T7151.hs:3:12:
+T7151.hs:3:12: [GHC-68567]
Illegal type: ‘[Int, String]’
- Perhaps you intended to use DataKinds
+ Suggested fix: Perhaps you intended to use DataKinds
diff --git a/testsuite/tests/rename/should_compile/ExplicitForAllRules1.stderr b/testsuite/tests/rename/should_compile/ExplicitForAllRules1.stderr
index d74f06b452..49a55fc84c 100644
--- a/testsuite/tests/rename/should_compile/ExplicitForAllRules1.stderr
+++ b/testsuite/tests/rename/should_compile/ExplicitForAllRules1.stderr
@@ -6,6 +6,6 @@ ExplicitForAllRules1.hs:45:31: warning: [GHC-64088] [-Wforall-identifier (in -Wd
Consider using another name, such as
‘forAll’, ‘for_all’, or ‘forall_’.
-ExplicitForAllRules1.hs:48:31: warning: [-Wunused-foralls (in -Wextra)]
+ExplicitForAllRules1.hs:48:31: warning: [GHC-54180] [-Wunused-foralls (in -Wextra)]
Unused quantified type variable ‘b’
In the rewrite rule "example7"
diff --git a/testsuite/tests/rename/should_compile/T5331.stderr b/testsuite/tests/rename/should_compile/T5331.stderr
index d57daceb0a..9ab7c83933 100644
--- a/testsuite/tests/rename/should_compile/T5331.stderr
+++ b/testsuite/tests/rename/should_compile/T5331.stderr
@@ -1,12 +1,12 @@
-T5331.hs:8:17: warning: [-Wunused-foralls (in -Wextra)]
+T5331.hs:8:17: warning: [GHC-54180] [-Wunused-foralls (in -Wextra)]
Unused quantified type variable ‘a’
In the definition of data constructor ‘S1’
-T5331.hs:11:16: warning: [-Wunused-foralls (in -Wextra)]
+T5331.hs:11:16: warning: [GHC-54180] [-Wunused-foralls (in -Wextra)]
Unused quantified type variable ‘a’
In the definition of data constructor ‘W1’
-T5331.hs:13:13: warning: [-Wunused-foralls (in -Wextra)]
+T5331.hs:13:13: warning: [GHC-54180] [-Wunused-foralls (in -Wextra)]
Unused quantified type variable ‘a’
In the type signature for ‘f’
diff --git a/testsuite/tests/rename/should_fail/T11663.stderr b/testsuite/tests/rename/should_fail/T11663.stderr
index 77e2999cec..4602d1992a 100644
--- a/testsuite/tests/rename/should_fail/T11663.stderr
+++ b/testsuite/tests/rename/should_fail/T11663.stderr
@@ -1,16 +1,20 @@
-T11663.hs:6:12: error:
+T11663.hs:6:12: error: [GHC-74097]
Illegal type signature: ‘Int’
Type signatures are only allowed in patterns with ScopedTypeVariables
+ Suggested fix: Perhaps you intended to use ScopedTypeVariables
-T11663.hs:7:9: error:
+T11663.hs:7:9: error: [GHC-74097]
Illegal type signature: ‘Int’
Type signatures are only allowed in patterns with ScopedTypeVariables
+ Suggested fix: Perhaps you intended to use ScopedTypeVariables
-T11663.hs:8:22: error:
+T11663.hs:8:22: error: [GHC-74097]
Illegal type signature: ‘Int’
Type signatures are only allowed in patterns with ScopedTypeVariables
+ Suggested fix: Perhaps you intended to use ScopedTypeVariables
-T11663.hs:9:32: error:
+T11663.hs:9:32: error: [GHC-74097]
Illegal type signature: ‘Int’
Type signatures are only allowed in patterns with ScopedTypeVariables
+ Suggested fix: Perhaps you intended to use ScopedTypeVariables
diff --git a/testsuite/tests/rename/should_fail/rnfail017.stderr b/testsuite/tests/rename/should_fail/rnfail017.stderr
index de2990864f..b286d22c60 100644
--- a/testsuite/tests/rename/should_fail/rnfail017.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail017.stderr
@@ -1,8 +1,8 @@
-rnfail017.hs:5:10:
+rnfail017.hs:5:10: [GHC-88747]
Precedence parsing error
cannot mix ‘+’ [infixl 6] and prefix `-' [infixl 6] in the same infix expression
-rnfail017.hs:6:10:
+rnfail017.hs:6:10: [GHC-88747]
Precedence parsing error
cannot mix ‘*’ [infixl 7] and prefix `-' [infixl 6] in the same infix expression
diff --git a/testsuite/tests/rename/should_fail/rnfail019.stderr b/testsuite/tests/rename/should_fail/rnfail019.stderr
index 2520641bd6..797b97900e 100644
--- a/testsuite/tests/rename/should_fail/rnfail019.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail019.stderr
@@ -1,5 +1,5 @@
-rnfail019.hs:5:9:
+rnfail019.hs:5:9: [GHC-46878]
The operator ‘:’ [infixr 5] of a section
must have lower precedence than that of the operand,
namely ‘:’ [infixr 5]
diff --git a/testsuite/tests/saks/should_fail/T16722.stderr b/testsuite/tests/saks/should_fail/T16722.stderr
index 0b50bb868d..94bb0bc82a 100644
--- a/testsuite/tests/saks/should_fail/T16722.stderr
+++ b/testsuite/tests/saks/should_fail/T16722.stderr
@@ -1,5 +1,5 @@
-T16722.hs:8:11: error:
+T16722.hs:8:11: error: [GHC-12875]
Unexpected kind variable ‘k’
- Perhaps you intended to use PolyKinds
In the standalone kind signature for D
+ Suggested fix: Perhaps you intended to use PolyKinds \ No newline at end of file
diff --git a/testsuite/tests/th/T8412.stderr b/testsuite/tests/th/T8412.stderr
index 9e69b8e880..cf7e458abd 100644
--- a/testsuite/tests/th/T8412.stderr
+++ b/testsuite/tests/th/T8412.stderr
@@ -1,4 +1,4 @@
-T8412.hs:5:11: error:
+T8412.hs:5:11: error: [GHC-93632]
• Illegal literal in type (type literals must not be negative): -1
• In the untyped splice: $(return $ LitT $ NumTyLit (- 1))
diff --git a/testsuite/tests/th/TH_Promoted1Tuple.stderr b/testsuite/tests/th/TH_Promoted1Tuple.stderr
index 2453cb26d5..fa5d55ebbf 100644
--- a/testsuite/tests/th/TH_Promoted1Tuple.stderr
+++ b/testsuite/tests/th/TH_Promoted1Tuple.stderr
@@ -1,3 +1,4 @@
-TH_Promoted1Tuple.hs:7:2: error:
- Illegal type: ‘'MkSolo Int’ Perhaps you intended to use DataKinds
+TH_Promoted1Tuple.hs:7:2: error: [GHC-68567]
+ Illegal type: ‘'MkSolo Int’
+ Suggested fix: Perhaps you intended to use DataKinds \ No newline at end of file
diff --git a/testsuite/tests/th/TH_unresolvedInfix2.stderr b/testsuite/tests/th/TH_unresolvedInfix2.stderr
index 50d56a02ff..b51699570c 100644
--- a/testsuite/tests/th/TH_unresolvedInfix2.stderr
+++ b/testsuite/tests/th/TH_unresolvedInfix2.stderr
@@ -1,5 +1,5 @@
-TH_unresolvedInfix2.hs:14:9: error:
+TH_unresolvedInfix2.hs:14:9: error: [GHC-46878]
• The operator ‘:+’ [infixl 6] of a section
must have lower precedence than that of the operand,
namely ‘:+’ [infixl 6]
diff --git a/testsuite/tests/typecheck/should_fail/T18252a.stderr b/testsuite/tests/typecheck/should_fail/T18252a.stderr
index 14908263a2..af3a941c1a 100644
--- a/testsuite/tests/typecheck/should_fail/T18252a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T18252a.stderr
@@ -1,4 +1,4 @@
-T18252a.hs:8:10:
+T18252a.hs:8:10: [GHC-88747]
Precedence parsing error
cannot mix ‘~’ [infix 4] and ‘~’ [infix 4] in the same infix expression \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_fail/T8306.stderr b/testsuite/tests/typecheck/should_fail/T8306.stderr
index 471da8d776..432b62201b 100644
--- a/testsuite/tests/typecheck/should_fail/T8306.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8306.stderr
@@ -1,3 +1,3 @@
-T8306.hs:4:10:
+T8306.hs:4:10: [GHC-93632]
Illegal literal in type (type literals must not be negative): -1
diff --git a/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiAppPat.stderr b/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiAppPat.stderr
index 87655cb6cf..757ed8f183 100644
--- a/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiAppPat.stderr
+++ b/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiAppPat.stderr
@@ -1,4 +1,4 @@
-TyAppPat_NonlinearMultiAppPat.hs:13:6: error:
+TyAppPat_NonlinearMultiAppPat.hs:13:6: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
diff --git a/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiPat.stderr b/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiPat.stderr
index 82c78654f7..3641e4b39d 100644
--- a/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiPat.stderr
+++ b/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearMultiPat.stderr
@@ -1,16 +1,16 @@
-TyAppPat_NonlinearMultiPat.hs:10:19: error:
+TyAppPat_NonlinearMultiPat.hs:10:19: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
-TyAppPat_NonlinearMultiPat.hs:11:18: error:
+TyAppPat_NonlinearMultiPat.hs:11:18: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
-TyAppPat_NonlinearMultiPat.hs:12:19: error:
+TyAppPat_NonlinearMultiPat.hs:12:19: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
-TyAppPat_NonlinearMultiPat.hs:13:18: error:
+TyAppPat_NonlinearMultiPat.hs:13:18: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
diff --git a/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearSinglePat.stderr b/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearSinglePat.stderr
index 0d06da09d2..c0118ccf82 100644
--- a/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearSinglePat.stderr
+++ b/testsuite/tests/typecheck/should_fail/TyAppPat_NonlinearSinglePat.stderr
@@ -1,3 +1,3 @@
-TyAppPat_NonlinearSinglePat.hs:13:6: error:
+TyAppPat_NonlinearSinglePat.hs:13:6: error: [GHC-92957]
Variable `a' would be bound multiple times by a type argument.
diff --git a/testsuite/tests/typecheck/should_fail/TyAppPat_ScopedTyVarConflict.stderr b/testsuite/tests/typecheck/should_fail/TyAppPat_ScopedTyVarConflict.stderr
index 5ce650e4be..eea80116d8 100644
--- a/testsuite/tests/typecheck/should_fail/TyAppPat_ScopedTyVarConflict.stderr
+++ b/testsuite/tests/typecheck/should_fail/TyAppPat_ScopedTyVarConflict.stderr
@@ -1,8 +1,8 @@
-TyAppPat_ScopedTyVarConflict.hs:10:6: error:
+TyAppPat_ScopedTyVarConflict.hs:10:6: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
-TyAppPat_ScopedTyVarConflict.hs:11:6: error:
+TyAppPat_ScopedTyVarConflict.hs:11:6: error: [GHC-69710]
Type variable ‘a’ is already in scope.
Type applications in patterns must bind fresh variables, without shadowing.
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index ebcec31f8d..0ae1fdd646 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -591,6 +591,7 @@ test('T17567', normal, compile_fail, [''])
test('T17562', normal, compile_fail, [''])
test('T17567StupidTheta', normal, compile_fail, [''])
test('T15474', normal, compile_fail, [''])
+test('T18252a', normal, compile_fail, [''])
test('T18455', normal, compile_fail, [''])
test('T18714', normal, compile_fail, [''])
test('T18723a', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_fail/tcfail094.stderr b/testsuite/tests/typecheck/should_fail/tcfail094.stderr
index d3f5e7623a..1928582727 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail094.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail094.stderr
@@ -1,3 +1,4 @@
-tcfail094.hs:7:14:
- Illegal type: ‘1’ Perhaps you intended to use DataKinds
+tcfail094.hs:7:14: [GHC-68567]
+ Illegal type: ‘1’
+ Suggested fix: Perhaps you intended to use DataKinds