
29 Jul
2013
29 Jul
'13
2:35 a.m.
AntC
writes:
Uh-oh, quoted the wrong example. I mean: Starting with: class C a b | a -> b where foo :: a -> b instance C [a] [a] where foo = id t11 = \x -> foo [x] -- t11 :: t -> [t] I then added: instance C [Char] [Char] where foo = id -- more specific! t12 = \x -> [x] -- t12 :: C [t] [t] => t -> [t] -- more polymorphic!