summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc060.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc060.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc060.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc060.hs b/testsuite/tests/typecheck/should_compile/tc060.hs
new file mode 100644
index 0000000000..6ae0ca9228
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc060.hs
@@ -0,0 +1,12 @@
+module ShouldSucceed where
+
+class Eq2 a where
+ deq :: a -> a -> Bool
+
+instance (Eq2 a) => Eq2 [a] where
+ deq (a:as) (b:bs) = if (deq a b) then (deq as bs) else False
+
+
+instance Eq2 Int where
+ deq x y = True
+