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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c62cd613803fa5b37dec2fc171c4a4bc4add907c

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

commit c62cd613803fa5b37dec2fc171c4a4bc4add907c
Author: Simon Peyton Jones <[email protected]>
Date:   Mon May 14 13:54:06 2012 +0100

    Test Trac #6015

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

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

diff --git a/tests/polykinds/T6015.hs b/tests/polykinds/T6015.hs
new file mode 100644
index 0000000..8f91025
--- /dev/null
+++ b/tests/polykinds/T6015.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE DataKinds, MultiParamTypeClasses, FunctionalDependencies,
+             PolyKinds, UndecidableInstances, ScopedTypeVariables #-}
+
+module T6015 where
+
+data Proxy a = Proxy
+
+class Value a t | a -> t where value :: Proxy a -> t
+
+instance Value True Bool where value _ = True
+
+instance Value a t => Value (Just a) (Maybe t)
+    where value _ = Just (value (Proxy :: Proxy a))
+
+test = value (Proxy :: Proxy (Just True))
diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T
index ebb8db6..cb017f1 100644
--- a/tests/polykinds/all.T
+++ b/tests/polykinds/all.T
@@ -45,3 +45,4 @@ test('T6020a', normal, compile, [''])
 test('T6044', normal, compile, [''])
 test('T6054', normal, run_command, ['$MAKE -s --no-print-directory T6054'])
 test('T6081', normal, compile, [''])
+test('T6015', normal, compile, [''])



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

Reply via email to