Test Trac #9739
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 31 Oct 2014 11:11:50 +0000 (11:11 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 4 Nov 2014 10:38:04 +0000 (10:38 +0000)
testsuite/tests/typecheck/should_fail/T9739.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T9739.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T9739.hs b/testsuite/tests/typecheck/should_fail/T9739.hs
new file mode 100644 (file)
index 0000000..4b7869d
--- /dev/null
@@ -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 (file)
index 0000000..95fcf6a
--- /dev/null
@@ -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’
index 2738e81..e9dd289 100644 (file)
@@ -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, [''])