[commit: ghc] wip/new-flatten-skolems-Oct14: Test Trac #9739 (054d7ef)
git at git.haskell.org
git at git.haskell.org
Fri Oct 31 13:44:05 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/new-flatten-skolems-Oct14
Link : http://ghc.haskell.org/trac/ghc/changeset/054d7efd316228cd53c608a5828a93df67766074/ghc
>---------------------------------------------------------------
commit 054d7efd316228cd53c608a5828a93df67766074
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Oct 31 11:11:50 2014 +0000
Test Trac #9739
>---------------------------------------------------------------
054d7efd316228cd53c608a5828a93df67766074
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