summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-04-26 09:28:45 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-04-26 09:28:45 +0100
commiteb32f344e3c0259cbd98c6384850d1f085d91219 (patch)
tree4a8c7836b68626a0b236eab85c05dc4f198ab385 /testsuite/tests/polykinds
parentfa48f52a0a2f15433cf7bd333dce457c7b202395 (diff)
downloadhaskell-eb32f344e3c0259cbd98c6384850d1f085d91219.tar.gz
Test Trac #6020 again, and #6044
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/T6020a.hs16
-rw-r--r--testsuite/tests/polykinds/T6044.hs6
-rw-r--r--testsuite/tests/polykinds/all.T2
3 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T6020a.hs b/testsuite/tests/polykinds/T6020a.hs
new file mode 100644
index 0000000000..00689786c3
--- /dev/null
+++ b/testsuite/tests/polykinds/T6020a.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE DataKinds, FunctionalDependencies, FlexibleInstances,
+ UndecidableInstances, PolyKinds, KindSignatures,
+ ConstraintKinds, FlexibleContexts, GADTs #-}
+
+module T6020a where
+
+class Id (a :: k) (b :: k) | b -> a
+instance a ~ b => Id a b
+
+class Test (x :: a) (y :: a)
+instance (Id x y, Id y z) => Test x z
+
+test :: Test True True => ()
+test = ()
+
+
diff --git a/testsuite/tests/polykinds/T6044.hs b/testsuite/tests/polykinds/T6044.hs
new file mode 100644
index 0000000000..dd35be9017
--- /dev/null
+++ b/testsuite/tests/polykinds/T6044.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, KindSignatures #-}
+
+module T6044 where
+
+type family Foo (a :: k) :: Maybe k
+type instance Foo a = Just a
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 92f6414ac4..5f136b16b9 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -41,3 +41,5 @@ test('T6025', normal, run_command, ['$MAKE -s --no-print-directory T6025'])
test('T6002', normal, compile, [''])
test('T6039', normal, compile_fail, [''])
test('T6021', normal, compile_fail, [''])
+test('T6020a', normal, compile, [''])
+test('T6044', normal, compile, [''])