blob: db07ad13254ee3a5034ba495fad0b07a4c1710b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-- !!! small class decl with local polymorphism;
-- !!! "easy" to check default methods and such...
-- !!! (this is the example given in TcClassDcl)
--
module ShouldSucceed where
class Foo a where
op1 :: a -> Bool
op2 :: Ord b => a -> b -> b -> b
op1 x = True
op2 x y z = if (op1 x) && (y < z) then y else z
instance Foo Int where {}
instance Foo a => Foo [a] where {}
|