diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T14735.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T14735.hs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T14735.hs b/testsuite/tests/typecheck/should_compile/T14735.hs new file mode 100644 index 0000000000..c48231b7c2 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T14735.hs @@ -0,0 +1,30 @@ +{-# Language QuantifiedConstraints #-} +{-# Language StandaloneDeriving #-} +{-# Language DataKinds #-} +{-# Language TypeOperators #-} +{-# Language GADTs #-} +{-# Language KindSignatures #-} +{-# Language FlexibleInstances #-} +{-# Language UndecidableInstances #-} +{-# Language MultiParamTypeClasses #-} +{-# Language RankNTypes #-} +{-# Language ConstraintKinds #-} + +module T14735 where + +import Data.Kind + +data D c where + D :: c => D c + +newtype a :- b = S (a => D b) + +class C1 a b +class C2 a b +instance C1 a b => C2 a b + +class (forall xx. f xx) => Limit f +instance (forall xx. f xx) => Limit f + +impl :: Limit (C1 a) :- Limit (C2 a) +impl = S D |