[commit: testsuite] master: Test Trac #7875 (0f286ce)

Simon Peyton Jones simonpj at microsoft.com
Fri May 3 09:05:26 CEST 2013


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

On branch  : master

https://github.com/ghc/testsuite/commit/0f286ce96a97a51bbcf2253786ee82b267ce2b5a

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

commit 0f286ce96a97a51bbcf2253786ee82b267ce2b5a
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri May 3 08:04:48 2013 +0100

    Test Trac #7875

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

 tests/typecheck/should_compile/T7875.hs |   32 +++++++++++++++++++++++++++++++
 tests/typecheck/should_compile/all.T    |    1 +
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_compile/T7875.hs b/tests/typecheck/should_compile/T7875.hs
new file mode 100644
index 0000000..9a8bf46
--- /dev/null
+++ b/tests/typecheck/should_compile/T7875.hs
@@ -0,0 +1,32 @@
+{-# LANGUAGE
+     FlexibleContexts
+   , FlexibleInstances
+   , FunctionalDependencies
+   , MultiParamTypeClasses
+   , KindSignatures
+   , UndecidableInstances #-}
+
+module T7875 where
+
+class Het a b | a -> b where
+  het :: m (f c) -> a -> m b
+
+class GHet (a :: * -> *) (b :: * -> *) | a -> b
+instance            GHet (K a) (K [a])
+instance Het a b => GHet (K a) (K b)
+
+
+data A a   = A (A a)
+data K x a = K x
+
+instance Het (A a) (A [a]) where het = het1
+
+het1 :: (GHet (K a) (K b)) => m (f c) -> a -> m b
+het1 = undefined
+
+
+{- Wanted
+     (GHet (K (A a)) (K (A [a])))
+
+-- Fundeps give ([A a] ~ A [a])
+-}
\ No newline at end of file
diff --git a/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T
index 8af6430..a362a22 100644
--- a/tests/typecheck/should_compile/all.T
+++ b/tests/typecheck/should_compile/all.T
@@ -399,3 +399,4 @@ test('T7541', normal, compile, [''])
 test('T7562', normal, compile, [''])
 test('T7641', normal, compile, [''])
 test('T7827', normal, compile, [''])
+test('T7875', normal, compile, [''])





More information about the ghc-commits mailing list