summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt
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/gadt
parenta13aff98cfccddee285b6550dd08c6ec1a3c4e17 (diff)
downloadhaskell-f161e890dfd41fd9735f4e259fffe2ce6d00ec1a.tar.gz
Use diagnostic infrastructure in GHC.Tc.Errors
Diffstat (limited to 'testsuite/tests/gadt')
-rw-r--r--testsuite/tests/gadt/T15558.stderr4
-rw-r--r--testsuite/tests/gadt/T7293.stderr4
-rw-r--r--testsuite/tests/gadt/T7294.stderr4
-rw-r--r--testsuite/tests/gadt/gadt-escape1.stderr4
-rw-r--r--testsuite/tests/gadt/gadt13.stderr4
-rw-r--r--testsuite/tests/gadt/gadt7.stderr4
6 files changed, 12 insertions, 12 deletions
diff --git a/testsuite/tests/gadt/T15558.stderr b/testsuite/tests/gadt/T15558.stderr
index ee70f0373b..e3223fb7a3 100644
--- a/testsuite/tests/gadt/T15558.stderr
+++ b/testsuite/tests/gadt/T15558.stderr
@@ -1,9 +1,9 @@
T15558.hs:11:15: warning: [-Winaccessible-code (in -Wdefault)]
- • Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
+ • Inaccessible code in
a type expected by the context:
(a ~ Bool) => ()
+ Couldn't match type ‘Int’ with ‘Bool’
• In the first argument of ‘MkFoo’, namely ‘()’
In the expression: MkFoo ()
In an equation for ‘f’: f MkT = MkFoo ()
diff --git a/testsuite/tests/gadt/T7293.stderr b/testsuite/tests/gadt/T7293.stderr
index 5625ff01c5..4546789ec2 100644
--- a/testsuite/tests/gadt/T7293.stderr
+++ b/testsuite/tests/gadt/T7293.stderr
@@ -4,9 +4,9 @@ T7293.hs:26:1: error: [-Woverlapping-patterns (in -Wdefault), -Werror=overlappin
In an equation for ‘nth’: nth Nil _ = ...
T7293.hs:26:5: error: [-Winaccessible-code (in -Wdefault), -Werror=inaccessible-code]
- • Couldn't match type ‘'False’ with ‘'True’
- Inaccessible code in
+ • Inaccessible code in
a pattern with constructor: Nil :: forall a. Vec a 'Zero,
in an equation for ‘nth’
+ Couldn't match type ‘'False’ with ‘'True’
• In the pattern: Nil
In an equation for ‘nth’: nth Nil _ = undefined
diff --git a/testsuite/tests/gadt/T7294.stderr b/testsuite/tests/gadt/T7294.stderr
index f694af8d0c..718a463e31 100644
--- a/testsuite/tests/gadt/T7294.stderr
+++ b/testsuite/tests/gadt/T7294.stderr
@@ -4,9 +4,9 @@ T7294.hs:27:1: warning: [-Woverlapping-patterns (in -Wdefault)]
In an equation for ‘nth’: nth Nil _ = ...
T7294.hs:27:5: warning: [-Winaccessible-code (in -Wdefault)]
- • Couldn't match type ‘'False’ with ‘'True’
- Inaccessible code in
+ • Inaccessible code in
a pattern with constructor: Nil :: forall a. Vec a 'Zero,
in an equation for ‘nth’
+ Couldn't match type ‘'False’ with ‘'True’
• In the pattern: Nil
In an equation for ‘nth’: nth Nil _ = undefined
diff --git a/testsuite/tests/gadt/gadt-escape1.stderr b/testsuite/tests/gadt/gadt-escape1.stderr
index f2b7ac569e..b237361699 100644
--- a/testsuite/tests/gadt/gadt-escape1.stderr
+++ b/testsuite/tests/gadt/gadt-escape1.stderr
@@ -1,6 +1,6 @@
gadt-escape1.hs:19:58: error:
- • Could not deduce: p ~ ExpGADT Int
+ • Could not deduce (p ~ ExpGADT Int)
from the context: t ~ Int
bound by a pattern with constructor: ExpInt :: Int -> ExpGADT Int,
in a case alternative
@@ -10,10 +10,10 @@ gadt-escape1.hs:19:58: error:
‘p’ is a rigid type variable bound by
the inferred type of weird1 :: p
at gadt-escape1.hs:19:1-58
- Possible fix: add a type signature for ‘weird1’
• In the expression: a
In a case alternative: Hidden (ExpInt _) a -> a
In the expression:
case (hval :: Hidden) of Hidden (ExpInt _) a -> a
• Relevant bindings include
weird1 :: p (bound at gadt-escape1.hs:19:1)
+ Suggested fix: Consider giving ‘weird1’ a type signature
diff --git a/testsuite/tests/gadt/gadt13.stderr b/testsuite/tests/gadt/gadt13.stderr
index 49eb2bc96f..83b0e73e53 100644
--- a/testsuite/tests/gadt/gadt13.stderr
+++ b/testsuite/tests/gadt/gadt13.stderr
@@ -1,6 +1,6 @@
gadt13.hs:15:13: error:
- • Could not deduce: p ~ (String -> [Char])
+ • Could not deduce (p ~ (String -> [Char]))
from the context: a ~ Int
bound by a pattern with constructor: I :: Int -> Term Int,
in an equation for ‘shw’
@@ -8,8 +8,8 @@ gadt13.hs:15:13: error:
‘p’ is a rigid type variable bound by
the inferred type of shw :: Term a -> p
at gadt13.hs:15:1-30
- Possible fix: add a type signature for ‘shw’
• In the expression: ("I " ++) . shows t
In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
• Relevant bindings include
shw :: Term a -> p (bound at gadt13.hs:15:1)
+ Suggested fix: Consider giving ‘shw’ a type signature
diff --git a/testsuite/tests/gadt/gadt7.stderr b/testsuite/tests/gadt/gadt7.stderr
index 314404c246..478c410468 100644
--- a/testsuite/tests/gadt/gadt7.stderr
+++ b/testsuite/tests/gadt/gadt7.stderr
@@ -1,6 +1,6 @@
gadt7.hs:16:38: error:
- • Could not deduce: p ~ p1
+ • Could not deduce (p ~ p1)
from the context: a ~ Int
bound by a pattern with constructor: K :: T Int,
in a case alternative
@@ -11,7 +11,6 @@ gadt7.hs:16:38: error:
‘p1’ is a rigid type variable bound by
the inferred type of i1b :: T a -> p -> p1
at gadt7.hs:16:1-44
- Possible fix: add a type signature for ‘i1b’
• In the expression: y1
In a case alternative: K -> y1
In the expression: case t1 of K -> y1
@@ -19,3 +18,4 @@ gadt7.hs:16:38: error:
y1 :: p (bound at gadt7.hs:16:16)
y :: p (bound at gadt7.hs:16:7)
i1b :: T a -> p -> p1 (bound at gadt7.hs:16:1)
+ Suggested fix: Consider giving ‘i1b’ a type signature