summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T6020.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-04-22 17:54:51 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-04-22 17:54:51 +0100
commit48bafff12ed5658b08c74c529c4c0b747c3968e9 (patch)
tree5c17da9e4f2460e5d867a63889667915626c2e88 /testsuite/tests/polykinds/T6020.hs
parentf8cc68f1226b55358ace5fc9d275bdf556176661 (diff)
downloadhaskell-48bafff12ed5658b08c74c529c4c0b747c3968e9.tar.gz
Test Trac #6020
Diffstat (limited to 'testsuite/tests/polykinds/T6020.hs')
-rw-r--r--testsuite/tests/polykinds/T6020.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T6020.hs b/testsuite/tests/polykinds/T6020.hs
new file mode 100644
index 0000000000..fa7de49030
--- /dev/null
+++ b/testsuite/tests/polykinds/T6020.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE DataKinds, FunctionalDependencies, FlexibleInstances,
+ UndecidableInstances, PolyKinds, KindSignatures,
+ ConstraintKinds, FlexibleContexts #-}
+module T6020 where
+
+import GHC.Prim (Constraint)
+
+class Id (a :: k) (b :: k) | a -> b
+instance Id a a
+
+class Test (x :: a) (y :: a) | x -> y
+instance (Id x y, Id y z) => Test x z
+
+test :: Test True True => ()
+test = ()
+
+foo = test