
8 Oct
2001
8 Oct
'01
6:03 p.m.
At 2001-10-08 09:27, Diego Dainese wrote:
what are the reasons behind the rule stating that a type must not be declared as an instance of a particular class, more than once in the program?
It's so that the members of the class are unambiguous. -- class C t where foo :: t -> Integer instance C Bool where foo _ = 3; instance C Bool where foo _ = 5; ambiguous = foo True; -- GHC has a flag that will turn the rule off. -- Ashley Yakeley, Seattle WA