diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc059.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc059.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc059.hs b/testsuite/tests/typecheck/should_compile/tc059.hs new file mode 100644 index 0000000000..f0faac8155 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc059.hs @@ -0,0 +1,15 @@ +module ShouldSucceed where + +class Eq2 a where + deq :: a -> a -> Bool + foo :: a -> a + +instance Eq2 Int where + deq x y = True + foo x = x + +instance (Eq2 a) => Eq2 [a] where + deq (a:as) (b:bs) = if (deq a (foo b)) then (deq as (foo bs)) else False + foo x = x + +f x = deq x [1] |