diff options
author | Torsten Schmits <git@tryp.io> | 2023-04-24 19:17:30 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-04-30 03:45:09 -0400 |
commit | 00a8a5ff9abf5bb1a0c2a9225c7bca5ec3bdf306 (patch) | |
tree | 0e0eef09ddb3df5e9b2a62e5195a706da219524d /testsuite/tests/rename/should_fail | |
parent | 57277662989b97dbf5ddc034d6c41ce39ab674ab (diff) | |
download | haskell-00a8a5ff9abf5bb1a0c2a9225c7bca5ec3bdf306.tar.gz |
Add structured error messages for GHC.Rename.Names
Tracking ticket: #20115
MR: !10336
This converts uses of `mkTcRnUnknownMessage` to newly added constructors
of `TcRnMessage`.
Diffstat (limited to 'testsuite/tests/rename/should_fail')
21 files changed, 33 insertions, 20 deletions
diff --git a/testsuite/tests/rename/should_fail/ImportLookupIllegal.hs b/testsuite/tests/rename/should_fail/ImportLookupIllegal.hs new file mode 100644 index 0000000000..f1bdacadcf --- /dev/null +++ b/testsuite/tests/rename/should_fail/ImportLookupIllegal.hs @@ -0,0 +1,3 @@ +module ImportLookupIllegal where + +import Control.Concurrent (module Control.Concurrent.MVar) diff --git a/testsuite/tests/rename/should_fail/ImportLookupIllegal.stderr b/testsuite/tests/rename/should_fail/ImportLookupIllegal.stderr new file mode 100644 index 0000000000..6e4ab849fb --- /dev/null +++ b/testsuite/tests/rename/should_fail/ImportLookupIllegal.stderr @@ -0,0 +1 @@ +ImportLookupIllegal.hs:3:28: [GHC-14752] Illegal import item diff --git a/testsuite/tests/rename/should_fail/PackageImportsDisabled.hs b/testsuite/tests/rename/should_fail/PackageImportsDisabled.hs new file mode 100644 index 0000000000..0a3faca96c --- /dev/null +++ b/testsuite/tests/rename/should_fail/PackageImportsDisabled.hs @@ -0,0 +1,3 @@ +module PackageImportsDisabled where + +import "base" Data.Char diff --git a/testsuite/tests/rename/should_fail/PackageImportsDisabled.stderr b/testsuite/tests/rename/should_fail/PackageImportsDisabled.stderr new file mode 100644 index 0000000000..63499309b6 --- /dev/null +++ b/testsuite/tests/rename/should_fail/PackageImportsDisabled.stderr @@ -0,0 +1,3 @@ +PackageImportsDisabled.hs:3:1: [GHC-10032] + Package-qualified imports are not enabled + Suggested fix: Perhaps you intended to use PackageImports diff --git a/testsuite/tests/rename/should_fail/T3792.stderr b/testsuite/tests/rename/should_fail/T3792.stderr index 964ea2ea8b..a8cd4670ae 100644 --- a/testsuite/tests/rename/should_fail/T3792.stderr +++ b/testsuite/tests/rename/should_fail/T3792.stderr @@ -1,3 +1,3 @@ -T3792.hs:3:17: error: +T3792.hs:3:17: error: [GHC-48795] Illegal qualified name in import item: Prelude.map diff --git a/testsuite/tests/rename/should_fail/T5211.stderr b/testsuite/tests/rename/should_fail/T5211.stderr index dc02ab4085..cca888e9de 100644 --- a/testsuite/tests/rename/should_fail/T5211.stderr +++ b/testsuite/tests/rename/should_fail/T5211.stderr @@ -1,5 +1,5 @@ -T5211.hs:5:1: warning: [-Wunused-imports (in -Wextra)] +T5211.hs:5:1: warning: [GHC-66111] [-Wunused-imports (in -Wextra)] The qualified import of ‘Foreign.Storable’ is redundant except perhaps to import instances from ‘Foreign.Storable’ To import instances alone, use: import Foreign.Storable() diff --git a/testsuite/tests/rename/should_fail/T7164.stderr b/testsuite/tests/rename/should_fail/T7164.stderr index 8049b27cde..732f8a1040 100644 --- a/testsuite/tests/rename/should_fail/T7164.stderr +++ b/testsuite/tests/rename/should_fail/T7164.stderr @@ -1,5 +1,5 @@ -T7164.hs:8:1: +T7164.hs:8:1: [GHC-29916] Multiple declarations of ‘derp’ Declared at: T7164.hs:5:5 T7164.hs:8:1 diff --git a/testsuite/tests/rename/should_fail/T7454.stderr b/testsuite/tests/rename/should_fail/T7454.stderr index ba9666cf35..2eb477b9ff 100644 --- a/testsuite/tests/rename/should_fail/T7454.stderr +++ b/testsuite/tests/rename/should_fail/T7454.stderr @@ -1,3 +1,3 @@ -T7454.hs:5:23: warning: [-Wunused-imports (in -Wextra)] +T7454.hs:5:23: warning: [GHC-38856] [-Wunused-imports (in -Wextra)] The import of ‘Arrow’ from module ‘Control.Arrow’ is redundant diff --git a/testsuite/tests/rename/should_fail/T8149.stderr b/testsuite/tests/rename/should_fail/T8149.stderr index 33b45e9598..c25cd8eb87 100644 --- a/testsuite/tests/rename/should_fail/T8149.stderr +++ b/testsuite/tests/rename/should_fail/T8149.stderr @@ -1,4 +1,4 @@ -T8149.hs:5:36: warning: [-Wunused-imports (in -Wextra)] +T8149.hs:5:36: warning: [GHC-38856] [-Wunused-imports (in -Wextra)] The import of ‘WriterT’ from module ‘Control.Monad.Trans.Writer’ is redundant diff --git a/testsuite/tests/rename/should_fail/T9032.stderr b/testsuite/tests/rename/should_fail/T9032.stderr index 21af9ac713..b64e7f0e26 100644 --- a/testsuite/tests/rename/should_fail/T9032.stderr +++ b/testsuite/tests/rename/should_fail/T9032.stderr @@ -1,2 +1,3 @@ -T9032.hs:6:1: A module cannot import itself: T9032 +T9032.hs:6:1: [GHC-43281] + A module cannot import itself: T9032 diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 53f6028f9c..7ea8d6fd3a 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -195,3 +195,5 @@ test('RnDefaultSigFail', normal, compile_fail, ['']) test('RnMultipleMinimalPragmaFail', normal, compile_fail, ['']) test('RnUnexpectedStandaloneDeriving', normal, compile_fail, ['']) test('RnStupidThetaInGadt', normal, compile_fail, ['']) +test('PackageImportsDisabled', normal, compile_fail, ['']) +test('ImportLookupIllegal', normal, compile_fail, ['']) diff --git a/testsuite/tests/rename/should_fail/rn_dup.stderr b/testsuite/tests/rename/should_fail/rn_dup.stderr index 907fc38fe8..7ebcb0ec33 100644 --- a/testsuite/tests/rename/should_fail/rn_dup.stderr +++ b/testsuite/tests/rename/should_fail/rn_dup.stderr @@ -1,10 +1,10 @@ -rn_dup.hs:9:10: error: +rn_dup.hs:9:10: error: [GHC-29916] Multiple declarations of ‘MkT’ Declared at: rn_dup.hs:7:16 rn_dup.hs:9:10 -rn_dup.hs:9:10: error: +rn_dup.hs:9:10: error: [GHC-29916] Multiple declarations of ‘MkT’ Declared at: rn_dup.hs:7:10 rn_dup.hs:9:10 @@ -12,17 +12,17 @@ rn_dup.hs:9:10: error: rn_dup.hs:11:27: error: [GHC-85524] Duplicate field name ‘rf’ in record declaration -rn_dup.hs:12:16: error: +rn_dup.hs:12:16: error: [GHC-29916] Multiple declarations of ‘rf’ Declared at: rn_dup.hs:11:27 rn_dup.hs:12:16 -rn_dup.hs:17:3: error: +rn_dup.hs:17:3: error: [GHC-29916] Multiple declarations of ‘CT’ Declared at: rn_dup.hs:15:3 rn_dup.hs:17:3 -rn_dup.hs:18:3: error: +rn_dup.hs:18:3: error: [GHC-29916] Multiple declarations of ‘f’ Declared at: rn_dup.hs:16:3 rn_dup.hs:18:3 diff --git a/testsuite/tests/rename/should_fail/rnfail002.stderr b/testsuite/tests/rename/should_fail/rnfail002.stderr index ffa05e767d..f68952bd4f 100644 --- a/testsuite/tests/rename/should_fail/rnfail002.stderr +++ b/testsuite/tests/rename/should_fail/rnfail002.stderr @@ -1,5 +1,5 @@ -rnfail002.hs:6:1: +rnfail002.hs:6:1: [GHC-29916] Multiple declarations of ‘y’ Declared at: rnfail002.hs:5:1 rnfail002.hs:6:1 diff --git a/testsuite/tests/rename/should_fail/rnfail003.stderr b/testsuite/tests/rename/should_fail/rnfail003.stderr index 24c74a6cbb..8d5d8183ea 100644 --- a/testsuite/tests/rename/should_fail/rnfail003.stderr +++ b/testsuite/tests/rename/should_fail/rnfail003.stderr @@ -1,5 +1,5 @@ -rnfail003.hs:4:1: +rnfail003.hs:4:1: [GHC-29916] Multiple declarations of ‘f’ Declared at: rnfail003.hs:2:1 rnfail003.hs:4:1 diff --git a/testsuite/tests/rename/should_fail/rnfail009.stderr b/testsuite/tests/rename/should_fail/rnfail009.stderr index d8d3fa5fcc..dcd35ef164 100644 --- a/testsuite/tests/rename/should_fail/rnfail009.stderr +++ b/testsuite/tests/rename/should_fail/rnfail009.stderr @@ -1,5 +1,5 @@ -rnfail009.hs:5:10: +rnfail009.hs:5:10: [GHC-29916] Multiple declarations of ‘A’ Declared at: rnfail009.hs:3:10 rnfail009.hs:5:10 diff --git a/testsuite/tests/rename/should_fail/rnfail010.stderr b/testsuite/tests/rename/should_fail/rnfail010.stderr index bd20f39188..7bfedd4b23 100644 --- a/testsuite/tests/rename/should_fail/rnfail010.stderr +++ b/testsuite/tests/rename/should_fail/rnfail010.stderr @@ -1,5 +1,5 @@ -rnfail010.hs:6:1: +rnfail010.hs:6:1: [GHC-29916] Multiple declarations of ‘f’ Declared at: rnfail010.hs:2:1 rnfail010.hs:6:1 diff --git a/testsuite/tests/rename/should_fail/rnfail011.stderr b/testsuite/tests/rename/should_fail/rnfail011.stderr index 0d55b36f50..2a15ab2dc4 100644 --- a/testsuite/tests/rename/should_fail/rnfail011.stderr +++ b/testsuite/tests/rename/should_fail/rnfail011.stderr @@ -1,5 +1,5 @@ -rnfail011.hs:6:1: +rnfail011.hs:6:1: [GHC-29916] Multiple declarations of ‘A’ Declared at: rnfail011.hs:2:1 rnfail011.hs:6:1 diff --git a/testsuite/tests/rename/should_fail/rnfail012.stderr b/testsuite/tests/rename/should_fail/rnfail012.stderr index 833256a1ca..a0d2293249 100644 --- a/testsuite/tests/rename/should_fail/rnfail012.stderr +++ b/testsuite/tests/rename/should_fail/rnfail012.stderr @@ -1,5 +1,5 @@ -rnfail012.hs:8:1: +rnfail012.hs:8:1: [GHC-29916] Multiple declarations of ‘A’ Declared at: rnfail012.hs:2:1 rnfail012.hs:8:1 diff --git a/testsuite/tests/rename/should_fail/rnfail013.stderr b/testsuite/tests/rename/should_fail/rnfail013.stderr index ae2ead8fc4..fbd225456b 100644 --- a/testsuite/tests/rename/should_fail/rnfail013.stderr +++ b/testsuite/tests/rename/should_fail/rnfail013.stderr @@ -1,5 +1,5 @@ -rnfail013.hs:7:11: +rnfail013.hs:7:11: [GHC-29916] Multiple declarations of ‘MkT’ Declared at: rnfail013.hs:5:11 rnfail013.hs:7:11 diff --git a/testsuite/tests/rename/should_fail/rnfail015.stderr b/testsuite/tests/rename/should_fail/rnfail015.stderr index 8edd5e3740..2d92dcf859 100644 --- a/testsuite/tests/rename/should_fail/rnfail015.stderr +++ b/testsuite/tests/rename/should_fail/rnfail015.stderr @@ -1,5 +1,5 @@ -rnfail015.hs:14:9: +rnfail015.hs:14:9: [GHC-29916] Multiple declarations of ‘TokLiteral’ Declared at: rnfail015.hs:8:9 rnfail015.hs:14:9 diff --git a/testsuite/tests/rename/should_fail/rnfail043.stderr b/testsuite/tests/rename/should_fail/rnfail043.stderr index 3547ac55b9..7c3d1f3ed7 100644 --- a/testsuite/tests/rename/should_fail/rnfail043.stderr +++ b/testsuite/tests/rename/should_fail/rnfail043.stderr @@ -1,5 +1,5 @@ -rnfail043.hs:10:1: +rnfail043.hs:10:1: [GHC-29916] Multiple declarations of ‘f’ Declared at: rnfail043.hs:6:1 rnfail043.hs:10:1 |