summaryrefslogtreecommitdiff
path: root/testsuite/tests/th
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/th
parenta13aff98cfccddee285b6550dd08c6ec1a3c4e17 (diff)
downloadhaskell-f161e890dfd41fd9735f4e259fffe2ce6d00ec1a.tar.gz
Use diagnostic infrastructure in GHC.Tc.Errors
Diffstat (limited to 'testsuite/tests/th')
-rw-r--r--testsuite/tests/th/T11680.stderr22
-rw-r--r--testsuite/tests/th/T11941.stderr7
-rw-r--r--testsuite/tests/th/T13837.stderr9
-rw-r--r--testsuite/tests/th/T18102.stderr10
-rw-r--r--testsuite/tests/th/T2713.stderr10
-rw-r--r--testsuite/tests/th/T5971.stderr9
-rw-r--r--testsuite/tests/th/T7241.stderr9
7 files changed, 43 insertions, 33 deletions
diff --git a/testsuite/tests/th/T11680.stderr b/testsuite/tests/th/T11680.stderr
index 07d88403f1..05e976837a 100644
--- a/testsuite/tests/th/T11680.stderr
+++ b/testsuite/tests/th/T11680.stderr
@@ -2,27 +2,29 @@
T11680.hs:15:7: error: Variable not in scope: noMatches :: Bool
T11680.hs:20:7: error:
- • Variable not in scope: abce :: [a]
- • Perhaps you meant ‘abcd’ (line 23)
+ Variable not in scope: abce :: [a]
+ Suggested fix: Perhaps use ‘abcd’ (line 23)
T11680.hs:31:7: error: Variable not in scope: foo :: Int
T11680.hs:39:7: error:
- • Variable not in scope: bar :: ()
- • Perhaps you meant one of these: ‘bat’ (line 42), ‘baz’ (line 45)
+ Variable not in scope: bar :: ()
+ Suggested fix:
+ Perhaps use one of these: ‘bat’ (line 42), ‘baz’ (line 45)
T11680.hs:50:7: error: Variable not in scope: ns :: [Double]
T11680.hs:55:7: error:
- • Variable not in scope: intercalate
- • Perhaps you meant ‘List.intercalate’ (imported from Data.List)
+ Variable not in scope: intercalate
+ Suggested fix:
+ Perhaps use ‘List.intercalate’ (imported from Data.List)
T11680.hs:59:7: error:
- • Variable not in scope: nub
- • Perhaps you meant ‘List.nub’ (imported from Data.List)
+ Variable not in scope: nub
+ Suggested fix: Perhaps use ‘List.nub’ (imported from Data.List)
T11680.hs:64:7: error: Variable not in scope: x :: t0 -> Int
T11680.hs:69:7: error:
- • Variable not in scope: cat :: ()
- • Perhaps you meant ‘bat’ (line 42)
+ Variable not in scope: cat :: ()
+ Suggested fix: Perhaps use ‘bat’ (line 42)
diff --git a/testsuite/tests/th/T11941.stderr b/testsuite/tests/th/T11941.stderr
index 4508ed3557..ca21f919fe 100644
--- a/testsuite/tests/th/T11941.stderr
+++ b/testsuite/tests/th/T11941.stderr
@@ -1,6 +1,7 @@
T11941.hs:7:30: error:
Not in scope: ‘getFrst’
- Perhaps you meant one of these:
- ‘getFirst’ (imported from Data.Monoid),
- ‘getLast’ (imported from Data.Monoid)
+ Suggested fix:
+ Perhaps use one of these:
+ ‘getFirst’ (imported from Data.Monoid),
+ ‘getLast’ (imported from Data.Monoid)
diff --git a/testsuite/tests/th/T13837.stderr b/testsuite/tests/th/T13837.stderr
index 7bb6587ded..a5f1005ca8 100644
--- a/testsuite/tests/th/T13837.stderr
+++ b/testsuite/tests/th/T13837.stderr
@@ -1,10 +1,11 @@
T13837.hs:9:4: error:
- • The exact Name ‘Fam’ is not in scope
- Probable cause: you used a unique Template Haskell name (NameU),
- perhaps via newName, but did not bind it
- If that's it, then -ddump-splices might be useful
+ • The Name ‘Fam’ is not in scope.
• In the argument of reifyInstances: Fam_0
In the untyped splice:
$(do fam_name <- newName "Fam"
stringE . show =<< qReifyInstances fam_name [])
+ Suggested fix:
+ If you bound a unique Template Haskell name (NameU)
+ perhaps via newName,
+ then -ddump-splices might be useful.
diff --git a/testsuite/tests/th/T18102.stderr b/testsuite/tests/th/T18102.stderr
index 9c1f1e2484..d757c9735f 100644
--- a/testsuite/tests/th/T18102.stderr
+++ b/testsuite/tests/th/T18102.stderr
@@ -8,18 +8,20 @@ T18102.hs:11:22: error:
T18102.hs:11:35: error:
• Not in scope: ‘fromInteger’
- Perhaps you want to add ‘fromInteger’ to the import list
- in the import of ‘Prelude’ (T18102.hs:5:1-50).
• In the Template Haskell quotation [|| if True then 10 else 15 ||]
In the typed splice:
$$(do _stuff <- [|| if True then 10 else 15 ||]
return [])
+ Suggested fix:
+ Perhaps you want to add ‘fromInteger’ to the import list
+ in the import of ‘Prelude’ (T18102.hs:5:1-50).
T18102.hs:11:43: error:
• Not in scope: ‘fromInteger’
- Perhaps you want to add ‘fromInteger’ to the import list
- in the import of ‘Prelude’ (T18102.hs:5:1-50).
• In the Template Haskell quotation [|| if True then 10 else 15 ||]
In the typed splice:
$$(do _stuff <- [|| if True then 10 else 15 ||]
return [])
+ Suggested fix:
+ Perhaps you want to add ‘fromInteger’ to the import list
+ in the import of ‘Prelude’ (T18102.hs:5:1-50).
diff --git a/testsuite/tests/th/T2713.stderr b/testsuite/tests/th/T2713.stderr
index 89a15ca83a..ce9091c79c 100644
--- a/testsuite/tests/th/T2713.stderr
+++ b/testsuite/tests/th/T2713.stderr
@@ -1,8 +1,10 @@
-T2713.hs:11:10:
+T2713.hs:11:10: error:
The fixity signature for ‘.*.’ lacks an accompanying binding
- (The fixity signature must be given where ‘.*.’ is declared)
+ Suggested fix:
+ Move the fixity signature to the declaration site of ‘.*.’.
-T2713.hs:12:1:
+T2713.hs:12:1: error:
The type signature for ‘f’ lacks an accompanying binding
- (The type signature must be given where ‘f’ is declared)
+ Suggested fix:
+ Move the type signature to the declaration site of ‘f’.
diff --git a/testsuite/tests/th/T5971.stderr b/testsuite/tests/th/T5971.stderr
index c8164cd1df..c06561b853 100644
--- a/testsuite/tests/th/T5971.stderr
+++ b/testsuite/tests/th/T5971.stderr
@@ -1,7 +1,8 @@
T5971.hs:6:6: error:
- • The exact Name ‘x’ is not in scope
- Probable cause: you used a unique Template Haskell name (NameU),
- perhaps via newName, but did not bind it
- If that's it, then -ddump-splices might be useful
+ • The Name ‘x’ is not in scope.
• In the untyped splice: $(newName "x" >>= varE)
+ Suggested fix:
+ If you bound a unique Template Haskell name (NameU)
+ perhaps via newName,
+ then -ddump-splices might be useful.
diff --git a/testsuite/tests/th/T7241.stderr b/testsuite/tests/th/T7241.stderr
index 1681b45f51..a46daa2c25 100644
--- a/testsuite/tests/th/T7241.stderr
+++ b/testsuite/tests/th/T7241.stderr
@@ -1,8 +1,9 @@
T7241.hs:7:2: error:
- Same exact name in multiple name-spaces:
+ Same Name in multiple name-spaces:
type constructor or class ‘Foo’, declared at: T7241.hs:7:2
data constructor ‘Foo’, declared at: T7241.hs:7:2
- Probable cause: you bound a unique Template Haskell name (NameU),
- perhaps via newName, in different name-spaces.
- If that's it, then -ddump-splices might be useful
+ Suggested fix:
+ If you bound a unique Template Haskell name (NameU)
+ perhaps via newName,
+ then -ddump-splices might be useful.