[commit: testsuite] master: Update T7594 as a result of fixing #8644 (cf68a8e)
git at git.haskell.org
git at git.haskell.org
Fri Jan 3 16:16:23 UTC 2014
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cf68a8e798fea44bea2804439732e534e096b0d1/testsuite
>---------------------------------------------------------------
commit cf68a8e798fea44bea2804439732e534e096b0d1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Jan 3 16:09:47 2014 +0000
Update T7594 as a result of fixing #8644
The fix to #8644 makes the original T7594 pass (rightly).
I've added a variant that shouuld and does fail
>---------------------------------------------------------------
cf68a8e798fea44bea2804439732e534e096b0d1
tests/polykinds/T7594.hs | 10 ++++++++++
tests/polykinds/T7594.stderr | 15 +++++++--------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/tests/polykinds/T7594.hs b/tests/polykinds/T7594.hs
index 89e749c..2cbd3db 100644
--- a/tests/polykinds/T7594.hs
+++ b/tests/polykinds/T7594.hs
@@ -23,5 +23,15 @@ q :: ColD (Show :&: Real)
q = ColD (1.2 :: Double)
bar = app print q
+-- This one works, as a result of fixing Trac #8644,
+-- because the given constraint is
+-- (Show :&: Real) a, which has no equality superclasses
+
+q2 :: ColD (c :&: Real)
+q2 = error "urk"
+
+bar2 = app print q2
+-- This one fail, because the given constraint is
+-- (c :&: Real) a, which might have equality superclasses
diff --git a/tests/polykinds/T7594.stderr b/tests/polykinds/T7594.stderr
index 64d0fa2..80d39f1 100644
--- a/tests/polykinds/T7594.stderr
+++ b/tests/polykinds/T7594.stderr
@@ -1,15 +1,14 @@
-T7594.hs:25:11:
+T7594.hs:32:12:
Couldn't match type ‛b’ with ‛IO ()’
‛b’ is untouchable
- inside the constraints ((:&:) Show Real a)
- bound by a type expected by the context:
- (:&:) Show Real a => a -> b
- at T7594.hs:25:7-17
+ inside the constraints ((:&:) c0 Real a)
+ bound by a type expected by the context: (:&:) c0 Real a => a -> b
+ at T7594.hs:32:8-19
‛b’ is a rigid type variable bound by
- the inferred type of bar :: b at T7594.hs:25:1
+ the inferred type of bar2 :: b at T7594.hs:32:1
Expected type: a -> b
Actual type: a -> IO ()
- Relevant bindings include bar :: b (bound at T7594.hs:25:1)
+ Relevant bindings include bar2 :: b (bound at T7594.hs:32:1)
In the first argument of ‛app’, namely ‛print’
- In the expression: app print q
+ In the expression: app print q2
More information about the ghc-commits
mailing list