1 --!!! test of cyclic default methods
4 op1 :: Fractional b => a -> b -> Bool
5 op2 :: Fractional b => a -> b -> Bool
6 op3 :: Fractional b => a -> b -> Bool
7 op4 :: Fractional b => a -> b -> Bool
8 op5 :: Fractional b => a -> b -> Bool
9 op6 :: Fractional b => a -> b -> Bool
11 -- each depends on the next:
12 op1 a b = not (op2 a b)
13 op2 a b = not (op3 a b)
14 op3 a b = not (op4 a b)
15 op4 a b = not (op5 a b)
16 op5 a b = not (op6 a b)
17 op6 a b = not (op1 a b)
19 -- now some instance decls to break the cycle:
20 instance Foo Int where
23 instance Foo Char where
26 instance Foo a => Foo [a] where
31 putStr (show (op2 (3::Int) 3.14159))
32 putStr (show (op2 'X' 3.14159))
33 putStr (show (op2 ([]::[Char])3.14159))