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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/9c6bdcc7e4add577d3bef8e17a5fbd2fcdf79a74

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

commit 9c6bdcc7e4add577d3bef8e17a5fbd2fcdf79a74
Author: Simon Peyton Jones <[email protected]>
Date:   Tue Sep 18 09:21:53 2012 +0100

    Test Trac #7238

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

 tests/polykinds/T7238.hs |   14 ++++++++++++++
 tests/polykinds/all.T    |    1 +
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/polykinds/T7238.hs b/tests/polykinds/T7238.hs
new file mode 100644
index 0000000..3639a8e
--- /dev/null
+++ b/tests/polykinds/T7238.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE ConstraintKinds, TypeFamilies #-}
+module T7238 where
+
+import GHC.Exts
+
+class Pair p where
+       type Ctxt p a :: Constraint
+       l :: Ctxt p a => p a -> a
+
+data Unit a = Unit
+
+instance Pair Unit where
+       type Ctxt Unit a = a ~ ()
+       l _ = ()
\ No newline at end of file
diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T
index 1ad1b31..b6d193f 100644
--- a/tests/polykinds/all.T
+++ b/tests/polykinds/all.T
@@ -66,5 +66,6 @@ test('T7090', normal, compile,[''])
 test('T7176', normal, compile,[''])
 test('T7224', normal, compile_fail,[''])
 test('T7230', normal, compile_fail,[''])
+test('T7238', normal, compile,[''])
 
 



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

Reply via email to