summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc260.hs
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2011-10-22 10:11:42 +0100
committerMax Bolingbroke <batterseapower@hotmail.com>2011-10-22 10:11:42 +0100
commit5830f5e14f7e87fb52372c1d5f41d77d74d77d84 (patch)
tree140943737f0c1212ba0920d14a30f8093dcd31c9 /testsuite/tests/typecheck/should_compile/tc260.hs
parent67572e2b80243cef6acb85dd77d165f97a8e364b (diff)
downloadhaskell-5830f5e14f7e87fb52372c1d5f41d77d74d77d84.tar.gz
Add new tests for relaxed superclass cycle check
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc260.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc260.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc260.hs b/testsuite/tests/typecheck/should_compile/tc260.hs
new file mode 100644
index 0000000000..29baeee903
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc260.hs
@@ -0,0 +1,11 @@
+-- Test we don't get a cycle for "phantom" superclasses,
+-- even if the phantomness is behind a type synonym
+{-# LANGUAGE ConstraintKinds, MultiParamTypeClasses, FlexibleContexts #-}
+module TcOK where
+
+class A ctxt c where
+ meth :: ctxt => c -> c
+
+type Bish = B Int
+
+class A Bish c => B c where