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