[commit: ghc] master: Test Trac #9739 (c639560)

git at git.haskell.org git at git.haskell.org
Tue Nov 4 10:38:55 UTC 2014


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

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

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

commit c639560d8ad969415033b19201d9626b1a0638bf
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Oct 31 11:11:50 2014 +0000

    Test Trac #9739


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

c639560d8ad969415033b19201d9626b1a0638bf
 testsuite/tests/typecheck/should_fail/T9739.hs     |  6 ++++++
 testsuite/tests/typecheck/should_fail/T9739.stderr | 10 ++++++++++
 testsuite/tests/typecheck/should_fail/all.T        |  1 +
 3 files changed, 17 insertions(+)

diff --git a/testsuite/tests/typecheck/should_fail/T9739.hs b/testsuite/tests/typecheck/should_fail/T9739.hs
new file mode 100644
index 0000000..4b7869d
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T9739.hs
@@ -0,0 +1,6 @@
+module T9739 where
+
+class Class2 a => Class1 a where
+  class3 :: (Class2 a) => b
+
+class (Class1 a) => Class2 a where
diff --git a/testsuite/tests/typecheck/should_fail/T9739.stderr b/testsuite/tests/typecheck/should_fail/T9739.stderr
new file mode 100644
index 0000000..95fcf6a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T9739.stderr
@@ -0,0 +1,10 @@
+
+T9739.hs:3:1:
+    Cycle in class declaration (via superclasses):
+      Class1 -> Class2 -> Class1
+    In the class declaration for ‘Class1’
+
+T9739.hs:6:1:
+    Cycle in class declaration (via superclasses):
+      Class2 -> Class1 -> Class2
+    In the class declaration for ‘Class2’
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 2738e81..e9dd289 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -341,3 +341,4 @@ test('T9323', normal, compile_fail, [''])
 test('T9415', normal, compile_fail, [''])
 test('T9612', normal, compile_fail, [''])
 test('T9634', normal, compile_fail, [''])
+test('T9739', normal, compile_fail, [''])



More information about the ghc-commits mailing list