[commit: testsuite] master: Test Trac #8359 (eb135c3)

git at git.haskell.org git
Tue Oct 1 17:27:44 UTC 2013


Repository : ssh://git at git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/eb135c315b6070ec677a4ca049c462e912002d7b/testsuite

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

commit eb135c315b6070ec677a4ca049c462e912002d7b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Oct 1 18:26:54 2013 +0100

    Test Trac #8359


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

eb135c315b6070ec677a4ca049c462e912002d7b
 tests/polykinds/T8359.hs |   17 +++++++++++++++++
 tests/polykinds/all.T    |    1 +
 2 files changed, 18 insertions(+)

diff --git a/tests/polykinds/T8359.hs b/tests/polykinds/T8359.hs
new file mode 100644
index 0000000..d172270
--- /dev/null
+++ b/tests/polykinds/T8359.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE ConstraintKinds, MultiParamTypeClasses #-}
+module T8359 where
+
+class DifferentTypes a b
+
+type DifferentTypes3 a b c = (DifferentTypes a b, DifferentTypes b c, DifferentTypes a c)
+
+class Foo a
+
+class Bar a
+
+-- Buggy instance requires UndecidableInstances to compile
+
+instance (DifferentTypes3 a b c, Bar a, Bar b, Bar c) => Foo (a, b, c)
+
+-- Equivalent instance compiles when manually expanding constraint type
+-- instance (DifferentTypes a b, DifferentTypes b c, DifferentTypes a c, Bar a, Bar b, Bar c) => Foo (a, b, c)
diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T
index 24b0fef..6ba9442 100644
--- a/tests/polykinds/all.T
+++ b/tests/polykinds/all.T
@@ -90,3 +90,4 @@ test('T7916', normal, compile,[''])
 test('T7973', normal, compile,['-O'])
 test('T7939a', normal, compile_fail, [''])
 test('T8132', normal, compile_fail, [''])
+test('T8359', normal, compile, [''])




More information about the ghc-commits mailing list