summaryrefslogtreecommitdiff
path: root/testsuite/tests/module
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-01-17 10:45:35 +0100
committersheaf <sam.derbyshire@gmail.com>2022-01-17 14:52:50 +0000
commitf161e890dfd41fd9735f4e259fffe2ce6d00ec1a (patch)
treee6c54b25f3cbb87458dea92c04e23993997e3746 /testsuite/tests/module
parenta13aff98cfccddee285b6550dd08c6ec1a3c4e17 (diff)
downloadhaskell-f161e890dfd41fd9735f4e259fffe2ce6d00ec1a.tar.gz
Use diagnostic infrastructure in GHC.Tc.Errors
Diffstat (limited to 'testsuite/tests/module')
-rw-r--r--testsuite/tests/module/mod101.stderr4
-rw-r--r--testsuite/tests/module/mod102.stderr4
-rw-r--r--testsuite/tests/module/mod114.stderr5
-rw-r--r--testsuite/tests/module/mod121.stderr4
-rw-r--r--testsuite/tests/module/mod124.stderr5
-rw-r--r--testsuite/tests/module/mod125.stderr5
-rw-r--r--testsuite/tests/module/mod126.stderr5
-rw-r--r--testsuite/tests/module/mod127.stderr5
-rw-r--r--testsuite/tests/module/mod130.stderr5
-rw-r--r--testsuite/tests/module/mod132.stderr2
-rw-r--r--testsuite/tests/module/mod134.stderr13
-rw-r--r--testsuite/tests/module/mod136.stderr7
-rw-r--r--testsuite/tests/module/mod160.stderr5
-rw-r--r--testsuite/tests/module/mod29.stderr5
-rw-r--r--testsuite/tests/module/mod36.stderr5
-rw-r--r--testsuite/tests/module/mod4.stderr2
-rw-r--r--testsuite/tests/module/mod62.stderr2
-rw-r--r--testsuite/tests/module/mod73.stderr11
-rw-r--r--testsuite/tests/module/mod74.stderr2
-rw-r--r--testsuite/tests/module/mod87.stderr7
-rw-r--r--testsuite/tests/module/mod88.stderr5
-rw-r--r--testsuite/tests/module/mod97.stderr7
22 files changed, 65 insertions, 50 deletions
diff --git a/testsuite/tests/module/mod101.stderr b/testsuite/tests/module/mod101.stderr
index 1c48186885..ecaae0a7d2 100644
--- a/testsuite/tests/module/mod101.stderr
+++ b/testsuite/tests/module/mod101.stderr
@@ -1,4 +1,4 @@
mod101.hs:8:5: error:
- • Data constructor not in scope: ConB :: Bool -> DataA
- • Perhaps you meant ‘ConA’ (imported from Mod101_AuxB)
+ Data constructor not in scope: ConB :: Bool -> DataA
+ Suggested fix: Perhaps use ‘ConA’ (imported from Mod101_AuxB)
diff --git a/testsuite/tests/module/mod102.stderr b/testsuite/tests/module/mod102.stderr
index 17ade933a6..afb4f9db7d 100644
--- a/testsuite/tests/module/mod102.stderr
+++ b/testsuite/tests/module/mod102.stderr
@@ -1,4 +1,4 @@
mod102.hs:8:5: error:
- • Variable not in scope: methB :: Bool -> Bool -> ()
- • Perhaps you meant ‘methA’ (imported from Mod102_AuxB)
+ Variable not in scope: methB :: Bool -> Bool -> ()
+ Suggested fix: Perhaps use ‘methA’ (imported from Mod102_AuxB)
diff --git a/testsuite/tests/module/mod114.stderr b/testsuite/tests/module/mod114.stderr
index 739ac82452..e473360f15 100644
--- a/testsuite/tests/module/mod114.stderr
+++ b/testsuite/tests/module/mod114.stderr
@@ -1,5 +1,6 @@
mod114.hs:3:16: error:
Not in scope: type constructor or class ‘Stuff’
- Perhaps you want to remove ‘Stuff’ from the explicit hiding list
- in the import of ‘Mod114_Help’ (mod114.hs:4:1-36).
+ Suggested fix:
+ Perhaps you want to remove ‘Stuff’ from the explicit hiding list
+ in the import of ‘Mod114_Help’ (mod114.hs:4:1-36).
diff --git a/testsuite/tests/module/mod121.stderr b/testsuite/tests/module/mod121.stderr
index fda1dec212..f51fec45e5 100644
--- a/testsuite/tests/module/mod121.stderr
+++ b/testsuite/tests/module/mod121.stderr
@@ -1,4 +1,4 @@
mod121.hs:5:5: error:
- • Variable not in scope: m2 :: Int -> t
- • Perhaps you meant ‘m1’ (imported from Mod121_A)
+ Variable not in scope: m2 :: Int -> t
+ Suggested fix: Perhaps use ‘m1’ (imported from Mod121_A)
diff --git a/testsuite/tests/module/mod124.stderr b/testsuite/tests/module/mod124.stderr
index a052a506ad..8c1109314b 100644
--- a/testsuite/tests/module/mod124.stderr
+++ b/testsuite/tests/module/mod124.stderr
@@ -1,5 +1,6 @@
mod124.hs:6:6: error:
Not in scope: type constructor or class ‘T’
- Perhaps you want to remove ‘T’ from the explicit hiding list
- in the import of ‘Mod124_A’ (mod124.hs:4:1-26).
+ Suggested fix:
+ Perhaps you want to remove ‘T’ from the explicit hiding list
+ in the import of ‘Mod124_A’ (mod124.hs:4:1-26).
diff --git a/testsuite/tests/module/mod125.stderr b/testsuite/tests/module/mod125.stderr
index e2b29849c4..d21066e279 100644
--- a/testsuite/tests/module/mod125.stderr
+++ b/testsuite/tests/module/mod125.stderr
@@ -1,5 +1,6 @@
mod125.hs:7:5: error:
Data constructor not in scope: T
- Perhaps you want to remove ‘T’ from the explicit hiding list
- in the import of ‘Mod125_A’ (mod125.hs:4:1-26).
+ Suggested fix:
+ Perhaps you want to remove ‘T’ from the explicit hiding list
+ in the import of ‘Mod125_A’ (mod125.hs:4:1-26).
diff --git a/testsuite/tests/module/mod126.stderr b/testsuite/tests/module/mod126.stderr
index 385ce4b341..871ac14945 100644
--- a/testsuite/tests/module/mod126.stderr
+++ b/testsuite/tests/module/mod126.stderr
@@ -1,5 +1,6 @@
mod126.hs:7:5: error:
Data constructor not in scope: T
- Perhaps you want to remove ‘T’ from the explicit hiding list
- in the import of ‘Mod126_A’ (mod126.hs:4:1-26).
+ Suggested fix:
+ Perhaps you want to remove ‘T’ from the explicit hiding list
+ in the import of ‘Mod126_A’ (mod126.hs:4:1-26).
diff --git a/testsuite/tests/module/mod127.stderr b/testsuite/tests/module/mod127.stderr
index 861d492d1a..66b1c1a530 100644
--- a/testsuite/tests/module/mod127.stderr
+++ b/testsuite/tests/module/mod127.stderr
@@ -1,5 +1,6 @@
mod127.hs:6:6: error:
Not in scope: type constructor or class ‘T’
- Perhaps you want to remove ‘T’ from the explicit hiding list
- in the import of ‘Mod127_A’ (mod127.hs:4:1-26).
+ Suggested fix:
+ Perhaps you want to remove ‘T’ from the explicit hiding list
+ in the import of ‘Mod127_A’ (mod127.hs:4:1-26).
diff --git a/testsuite/tests/module/mod130.stderr b/testsuite/tests/module/mod130.stderr
index 9e41bcdc42..e19a3e258b 100644
--- a/testsuite/tests/module/mod130.stderr
+++ b/testsuite/tests/module/mod130.stderr
@@ -1,5 +1,6 @@
mod130.hs:7:5: error:
Variable not in scope: (<) :: t0 -> Int -> Int
- Perhaps you want to remove ‘<’ from the explicit hiding list
- in the import of ‘Prelude’ (mod130.hs:4:1-33).
+ Suggested fix:
+ Perhaps you want to remove ‘<’ from the explicit hiding list
+ in the import of ‘Prelude’ (mod130.hs:4:1-33).
diff --git a/testsuite/tests/module/mod132.stderr b/testsuite/tests/module/mod132.stderr
index 0c901d090c..4913c59b06 100644
--- a/testsuite/tests/module/mod132.stderr
+++ b/testsuite/tests/module/mod132.stderr
@@ -3,6 +3,6 @@ mod132.hs:6:7: error:
• Illegal term-level use of the type constructor or class ‘Foo’
• imported from ‘Mod132_B’ at mod132.hs:4:1-15
(and originally defined in ‘Mod132_A’ at Mod132_A.hs:3:1-14)
- • Perhaps you meant variable ‘foo’ (line 6)
+ • Perhaps use variable ‘foo’ (line 6)
• In the expression: Foo
In an equation for ‘foo’: foo = Foo
diff --git a/testsuite/tests/module/mod134.stderr b/testsuite/tests/module/mod134.stderr
index 75c556cd4f..a911e32c84 100644
--- a/testsuite/tests/module/mod134.stderr
+++ b/testsuite/tests/module/mod134.stderr
@@ -1,9 +1,10 @@
mod134.hs:6:19: error:
Not in scope: ‘Prelude.head’
- Perhaps you meant one of these:
- ‘Prelude.read’ (imported from Prelude),
- ‘Prelude.reads’ (imported from Prelude),
- ‘Prelude.id’ (imported from Prelude)
- Perhaps you want to remove ‘head’ from the explicit hiding list
- in the import of ‘Prelude’ (mod134.hs:4:1-28).
+ Suggested fixes:
+ • Perhaps use one of these:
+ ‘Prelude.read’ (imported from Prelude),
+ ‘Prelude.reads’ (imported from Prelude),
+ ‘Prelude.id’ (imported from Prelude)
+ • Perhaps you want to remove ‘head’ from the explicit hiding list
+ in the import of ‘Prelude’ (mod134.hs:4:1-28).
diff --git a/testsuite/tests/module/mod136.stderr b/testsuite/tests/module/mod136.stderr
index fc5e0d682c..3a54d8f2e3 100644
--- a/testsuite/tests/module/mod136.stderr
+++ b/testsuite/tests/module/mod136.stderr
@@ -1,6 +1,7 @@
mod136.hs:7:5: error:
Variable not in scope: zipWith5
- Perhaps you meant one of these:
- ‘zipWith’ (imported from Mod136_A),
- ‘zipWith3’ (imported from Mod136_A)
+ Suggested fix:
+ Perhaps use one of these:
+ ‘zipWith’ (imported from Mod136_A),
+ ‘zipWith3’ (imported from Mod136_A)
diff --git a/testsuite/tests/module/mod160.stderr b/testsuite/tests/module/mod160.stderr
index d853c67e6b..d7cba8d1e8 100644
--- a/testsuite/tests/module/mod160.stderr
+++ b/testsuite/tests/module/mod160.stderr
@@ -1,6 +1,7 @@
mod160.hs:12:5: error:
- • Variable not in scope: m3 :: Char -> t
- • Perhaps you meant one of these:
+ Variable not in scope: m3 :: Char -> t
+ Suggested fix:
+ Perhaps use one of these:
‘m1’ (imported from Mod159_D), ‘m2’ (imported from Mod159_D)
exit(1)
diff --git a/testsuite/tests/module/mod29.stderr b/testsuite/tests/module/mod29.stderr
index e70c5df83d..0392497c2e 100644
--- a/testsuite/tests/module/mod29.stderr
+++ b/testsuite/tests/module/mod29.stderr
@@ -1,5 +1,6 @@
mod29.hs:6:12: error:
Not in scope: type constructor or class ‘Char’
- Perhaps you want to add ‘Char’ to the import list in the import of
- ‘Prelude’ (mod29.hs:5:1-19).
+ Suggested fix:
+ Perhaps you want to add ‘Char’ to the import list in the import of
+ ‘Prelude’ (mod29.hs:5:1-19).
diff --git a/testsuite/tests/module/mod36.stderr b/testsuite/tests/module/mod36.stderr
index f70285acea..438b97b6aa 100644
--- a/testsuite/tests/module/mod36.stderr
+++ b/testsuite/tests/module/mod36.stderr
@@ -1,5 +1,6 @@
mod36.hs:5:5: error:
Variable not in scope: const
- Perhaps you want to remove ‘const’ from the explicit hiding list
- in the import of ‘Prelude’ (mod36.hs:3:1-32).
+ Suggested fix:
+ Perhaps you want to remove ‘const’ from the explicit hiding list
+ in the import of ‘Prelude’ (mod36.hs:3:1-32).
diff --git a/testsuite/tests/module/mod4.stderr b/testsuite/tests/module/mod4.stderr
index d9e8339740..2b4d400b28 100644
--- a/testsuite/tests/module/mod4.stderr
+++ b/testsuite/tests/module/mod4.stderr
@@ -1,5 +1,5 @@
mod4.hs:2:10: error:
• Not in scope: data constructor ‘K2’
- Perhaps you meant ‘K1’ (line 3)
• In the export: T(K1, K2)
+ Suggested fix: Perhaps use ‘K1’ (line 3)
diff --git a/testsuite/tests/module/mod62.stderr b/testsuite/tests/module/mod62.stderr
index 0a2ceff6d9..539a905f26 100644
--- a/testsuite/tests/module/mod62.stderr
+++ b/testsuite/tests/module/mod62.stderr
@@ -3,4 +3,4 @@ mod62.hs:3:9: error: Qualified name in binding position: M.y
mod62.hs:3:22: error:
Not in scope: ‘M.y’
- Perhaps you meant ‘M.x’ (line 3)
+ Suggested fix: Perhaps use ‘M.x’ (line 3)
diff --git a/testsuite/tests/module/mod73.stderr b/testsuite/tests/module/mod73.stderr
index 12dc6b2b39..2fe9582a4a 100644
--- a/testsuite/tests/module/mod73.stderr
+++ b/testsuite/tests/module/mod73.stderr
@@ -1,8 +1,9 @@
mod73.hs:3:7: error:
Not in scope: ‘Prelude.g’
- Perhaps you meant one of these:
- data constructor ‘Prelude.GT’ (imported from Prelude),
- data constructor ‘Prelude.EQ’ (imported from Prelude),
- data constructor ‘Prelude.LT’ (imported from Prelude)
- Module ‘Prelude’ does not export ‘g’.
+ NB: the module ‘Prelude’ does not export ‘g’.
+ Suggested fix:
+ Perhaps use one of these:
+ data constructor ‘Prelude.EQ’ (imported from Prelude),
+ data constructor ‘Prelude.GT’ (imported from Prelude),
+ data constructor ‘Prelude.LT’ (imported from Prelude)
diff --git a/testsuite/tests/module/mod74.stderr b/testsuite/tests/module/mod74.stderr
index 55a8ca65f2..e971158606 100644
--- a/testsuite/tests/module/mod74.stderr
+++ b/testsuite/tests/module/mod74.stderr
@@ -1,4 +1,4 @@
mod74.hs:3:7: error:
Not in scope: ‘N.g’
- No module named ‘N’ is imported.
+ NB: no module named ‘N’ is imported.
diff --git a/testsuite/tests/module/mod87.stderr b/testsuite/tests/module/mod87.stderr
index 504075b47c..c5b92a85da 100644
--- a/testsuite/tests/module/mod87.stderr
+++ b/testsuite/tests/module/mod87.stderr
@@ -1,5 +1,6 @@
mod87.hs:4:5: error:
- • Data constructor not in scope: Left :: GHC.Types.Char -> t
- • Perhaps you want to add ‘Left’ to the import list
- in the import of ‘Prelude’ (mod87.hs:3:1-22).
+ Data constructor not in scope: Left :: GHC.Types.Char -> t
+ Suggested fix:
+ Perhaps you want to add ‘Left’ to the import list in the import of
+ ‘Prelude’ (mod87.hs:3:1-22).
diff --git a/testsuite/tests/module/mod88.stderr b/testsuite/tests/module/mod88.stderr
index f145350c4e..aa2627c861 100644
--- a/testsuite/tests/module/mod88.stderr
+++ b/testsuite/tests/module/mod88.stderr
@@ -1,5 +1,6 @@
mod88.hs:5:5: error:
Not in scope: data constructor ‘Prelude.Left’
- Perhaps you want to add ‘Left’ to the import list in the import of
- ‘Prelude’ (mod88.hs:4:1-30).
+ Suggested fix:
+ Perhaps you want to add ‘Left’ to the import list in the import of
+ ‘Prelude’ (mod88.hs:4:1-30).
diff --git a/testsuite/tests/module/mod97.stderr b/testsuite/tests/module/mod97.stderr
index f5cec79104..db9b30e83d 100644
--- a/testsuite/tests/module/mod97.stderr
+++ b/testsuite/tests/module/mod97.stderr
@@ -1,6 +1,7 @@
mod97.hs:4:9: error:
- • Variable not in scope:
- (==) :: GHC.Types.Char -> GHC.Types.Char -> t
- • Perhaps you want to add ‘==’ to the import list in the import of
+ Variable not in scope:
+ (==) :: GHC.Types.Char -> GHC.Types.Char -> t
+ Suggested fix:
+ Perhaps you want to add ‘==’ to the import list in the import of
‘Prelude’ (mod97.hs:3:1-18).