diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-01-03 16:09:47 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-01-03 16:09:47 +0000 |
commit | b0cdb9b3b6c61463241093161a5b6cf6144e7348 (patch) | |
tree | b69b4cad0e9c8647706abfacaa54f5c4ed7497c4 /testsuite/tests | |
parent | c06528c3c988ea1c1515c7033158728f8ed20bf0 (diff) | |
download | haskell-b0cdb9b3b6c61463241093161a5b6cf6144e7348.tar.gz |
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
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/polykinds/T7594.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T7594.stderr | 15 |
2 files changed, 17 insertions, 8 deletions
diff --git a/testsuite/tests/polykinds/T7594.hs b/testsuite/tests/polykinds/T7594.hs index 89e749ce36..2cbd3db88d 100644 --- a/testsuite/tests/polykinds/T7594.hs +++ b/testsuite/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/testsuite/tests/polykinds/T7594.stderr b/testsuite/tests/polykinds/T7594.stderr index 64d0fa2f8c..80d39f16b7 100644 --- a/testsuite/tests/polykinds/T7594.stderr +++ b/testsuite/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 |