
10 May
2011
10 May
'11
12:01 a.m.
On 05/09/2011 07:44 PM, Elvio Toccalino wrote:
One further addendum to the answer provided by Arlen:
Notice that
instance Eq Point where (==) a b = getX a == getX b && getY a == getY b
is defining equality between 'Point a' (as well pointed out by Arlen), but it does so in terms of equality test between 'a'... but there's no declaration in your code stating that 'a' can be equated. This all boils does to the following instance declaration:
instance Eq a => Eq (Point a) where ...
which reads nicely :)
Ah... Makes perfect sense now. Thanks! I'm glad I finally got around to joining this mailing list. -- frigidcode.com theologia.indicium.us