[commit: ghc] master: Test Trac #10451 (8a38348)

git at git.haskell.org git at git.haskell.org
Tue Jun 2 10:59:31 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8a3834833d2636134f2e0617e6d85a68e92de551/ghc

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

commit 8a3834833d2636134f2e0617e6d85a68e92de551
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jun 2 11:59:29 2015 +0100

    Test Trac #10451


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

8a3834833d2636134f2e0617e6d85a68e92de551
 testsuite/tests/polykinds/T10451.hs     | 10 ++++++++++
 testsuite/tests/polykinds/T10451.stderr |  7 +++++++
 testsuite/tests/polykinds/all.T         |  2 +-
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/polykinds/T10451.hs b/testsuite/tests/polykinds/T10451.hs
new file mode 100644
index 0000000..8ba867f
--- /dev/null
+++ b/testsuite/tests/polykinds/T10451.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE ConstraintKinds #-}
+
+module T10451 where
+
+type T a = ( Eq a, Eq a, Eq a, Eq a
+           , Eq a, Eq a, Eq a, Eq a
+           , Eq a, Eq a, Eq a, Eq a
+           , Eq a, Eq a, Eq a, Eq a
+           , Eq a, Eq a, Eq a, Eq a )
+
diff --git a/testsuite/tests/polykinds/T10451.stderr b/testsuite/tests/polykinds/T10451.stderr
new file mode 100644
index 0000000..56f037f
--- /dev/null
+++ b/testsuite/tests/polykinds/T10451.stderr
@@ -0,0 +1,7 @@
+
+T10451.hs:5:12: error:
+    Constraint tuple arity too large: 20 (max arity = 16)
+      Instead, use a nested tuple
+    In the type ‘(Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
+                  Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a)’
+    In the type declaration for ‘T’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 7321387..75d2321 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -115,4 +115,4 @@ test('T9574', normal, compile_fail, [''])
 test('T9833', normal, compile, [''])
 test('T7908', normal, compile, [''])
 test('T10041', normal, compile, [''])
-
+test('T10451', normal, compile_fail, [''])



More information about the ghc-commits mailing list