Commit c3e6b3ac authored by Simon Peyton Jones's avatar Simon Peyton Jones

Regression test for Trac #10390

parent 931d014d
{-# LANGUAGE RankNTypes #-}
module T10390 where
class ApPair r where
apPair :: (forall a . (ApPair a, Num a) => Maybe a) -> Maybe r
instance (ApPair a, ApPair b) => ApPair (a,b) where
apPair = apPair'
apPair' :: (ApPair b, ApPair c)
=> (forall a . (Num a, ApPair a) => Maybe a) -> Maybe (b,c)
-- NB constraints in a different order to apPair
apPair' f = let (Just a) = apPair f
(Just b) = apPair f
in Just $ (a, b)
......@@ -453,3 +453,4 @@ test('TcCustomSolverSuper', normal, compile, [''])
test('T10335', normal, compile, [''])
test('Improvement', normal, compile, [''])
test('T10009', normal, compile, [''])
test('T10390', normal, compile, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment