diff options
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 |