Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2119f6c858eddd0ba8c04b659122e916fd0c6c0b

>---------------------------------------------------------------

commit 2119f6c858eddd0ba8c04b659122e916fd0c6c0b
Author: Simon Peyton Jones <[email protected]>
Date:   Thu Apr 26 09:28:45 2012 +0100

    Test Trac #6020 again, and #6044

>---------------------------------------------------------------

 tests/polykinds/T6020a.hs |   16 ++++++++++++++++
 tests/polykinds/T6044.hs  |    6 ++++++
 tests/polykinds/all.T     |    2 ++
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/tests/polykinds/T6020a.hs b/tests/polykinds/T6020a.hs
new file mode 100644
index 0000000..0068978
--- /dev/null
+++ b/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/tests/polykinds/T6044.hs b/tests/polykinds/T6044.hs
new file mode 100644
index 0000000..dd35be9
--- /dev/null
+++ b/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/tests/polykinds/all.T b/tests/polykinds/all.T
index 92f6414..5f136b1 100644
--- a/tests/polykinds/all.T
+++ b/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, [''])



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to