Documentation for (&&) and (&&) states that they are lazy in their second argument...
[ghc.git] / testsuite / tests / typecheck / should_compile / T14774.hs
1 {-# LANGUAGE UndecidableSuperClasses #-}
2
3 module T14774 where
4
5 class C a => D a where
6 cop :: a -> Bool
7
8 class D a => C a where
9 dop :: a -> a
10
11 f :: C a => Int -> a -> Bool
12 f 0 x = cop x
13 f n x = f (n-1) x