X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftests%2Ftypecheck%2Fshould_succeed%2Ftc059.hs;fp=ghc%2Fcompiler%2Ftests%2Ftypecheck%2Fshould_succeed%2Ftc059.hs;h=f0faac8155968230cf6de449e1fc581906d87336;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/compiler/tests/typecheck/should_succeed/tc059.hs b/ghc/compiler/tests/typecheck/should_succeed/tc059.hs new file mode 100644 index 0000000..f0faac8 --- /dev/null +++ b/ghc/compiler/tests/typecheck/should_succeed/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]