[commit: ghc] wip/tdammers/T11066: Make some tests pass (70cbf00)
git at git.haskell.org
git at git.haskell.org
Wed May 30 10:46:54 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tdammers/T11066
Link : http://ghc.haskell.org/trac/ghc/changeset/70cbf008126ab2ba3abc416ed77ea15a3ade6104/ghc
>---------------------------------------------------------------
commit 70cbf008126ab2ba3abc416ed77ea15a3ade6104
Author: Tobias Dammers <tdammers at gmail.com>
Date: Wed May 30 10:46:52 2018 +0200
Make some tests pass
>---------------------------------------------------------------
70cbf008126ab2ba3abc416ed77ea15a3ade6104
testsuite/tests/gadt/T3651.stderr | 27 ++++++++--------------
testsuite/tests/gadt/T7294.stderr | 2 +-
testsuite/tests/gadt/T7558.stderr | 13 +++++------
testsuite/tests/ghci/scripts/Defer02.stderr | 2 +-
.../typecheck/should_fail/FrozenErrorTests.stderr | 9 --------
5 files changed, 18 insertions(+), 35 deletions(-)
diff --git a/testsuite/tests/gadt/T3651.stderr b/testsuite/tests/gadt/T3651.stderr
index 14216eb..62e3bf1 100644
--- a/testsuite/tests/gadt/T3651.stderr
+++ b/testsuite/tests/gadt/T3651.stderr
@@ -1,21 +1,14 @@
-T3651.hs:11:11: error:
- • Couldn't match type ‘Bool’ with ‘()’
- Inaccessible code in
- a pattern with constructor: U :: Z (), in an equation for ‘unsafe1’
- • In the pattern: U
+T3651.hs:11:15: error:
+ • Couldn't match type ‘()’ with ‘Bool’
+ Expected type: a
+ Actual type: ()
+ • In the expression: ()
In an equation for ‘unsafe1’: unsafe1 B U = ()
-T3651.hs:14:11: error:
- • Couldn't match type ‘Bool’ with ‘()’
- Inaccessible code in
- a pattern with constructor: U :: Z (), in an equation for ‘unsafe2’
- • In the pattern: U
+T3651.hs:14:15: error:
+ • Couldn't match type ‘()’ with ‘Bool’
+ Expected type: a
+ Actual type: ()
+ • In the expression: ()
In an equation for ‘unsafe2’: unsafe2 B U = ()
-
-T3651.hs:17:11: error:
- • Couldn't match type ‘Bool’ with ‘()’
- Inaccessible code in
- a pattern with constructor: U :: Z (), in an equation for ‘unsafe3’
- • In the pattern: U
- In an equation for ‘unsafe3’: unsafe3 B U = True
diff --git a/testsuite/tests/gadt/T7294.stderr b/testsuite/tests/gadt/T7294.stderr
index 2782b8a..63b3e0e 100644
--- a/testsuite/tests/gadt/T7294.stderr
+++ b/testsuite/tests/gadt/T7294.stderr
@@ -3,7 +3,7 @@ T7294.hs:25:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match is redundant
In an equation for ‘nth’: nth Nil _ = ...
-T7294.hs:25:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+T7294.hs:25:5: warning: [-Winaccessible-code (in -Wdefault)]
• Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor: Nil :: forall a. Vec a 'Zero,
diff --git a/testsuite/tests/gadt/T7558.stderr b/testsuite/tests/gadt/T7558.stderr
index f3d7436..29d7fa6 100644
--- a/testsuite/tests/gadt/T7558.stderr
+++ b/testsuite/tests/gadt/T7558.stderr
@@ -1,11 +1,10 @@
-T7558.hs:8:4: error:
+T7558.hs:8:18: error:
• Occurs check: cannot construct the infinite type: a ~ Maybe a
- Inaccessible code in
- a pattern with constructor:
- MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b,
- in an equation for ‘f’
- • In the pattern: MkT x y
- In an equation for ‘f’: f (MkT x y) = [x, y] `seq` True
+ • In the expression: y
+ In the first argument of ‘seq’, namely ‘[x, y]’
+ In the expression: [x, y] `seq` True
• Relevant bindings include
+ y :: Maybe a (bound at T7558.hs:8:10)
+ x :: a (bound at T7558.hs:8:8)
f :: T a a -> Bool (bound at T7558.hs:8:1)
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 5aa67f0..33c82bb 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -21,7 +21,7 @@ Defer01.hs:25:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match has inaccessible right hand side
In an equation for ‘c’: c (C2 x) = ...
-Defer01.hs:25:4: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:25:4: warning: [-Winaccessible-code (in -Wdefault)]
• Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
a pattern with constructor: C2 :: Bool -> C Bool,
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 6abb044..613d92b 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -1,13 +1,4 @@
-FrozenErrorTests.hs:12:12: error:
- • Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- a pattern with constructor: MkT3 :: forall a. (a ~ Bool) => T a,
- in a case alternative
- • In the pattern: MkT3
- In a case alternative: MkT3 -> ()
- In the expression: case x of { MkT3 -> () }
-
FrozenErrorTests.hs:26:9: error:
• Occurs check: cannot construct the infinite type: a ~ [a]
arising from a use of ‘goo1’
More information about the ghc-commits
mailing list