
13 Mar
2008
13 Mar
'08
6:01 a.m.
Luke Palmer wrote:
On Thu, Mar 13, 2008 at 3:02 AM, Adrian Hey
wrote: The report doesn't state that for all Ints, (x==y = True) implies that x=y. There's no reason to suppose the Int instance is in any way special, so do you really seriously consider the possibility that this might not hold in your Int related code?
if (x==y) then f x else g x y
might not mean the same as..
if (x==y) then f y else g x y
Of course not :-). However, on what grounds am I to assume that these two will be semantically equivalent for instances other than Int?
Umm..Maybe the fact that you're using the == method from the Eq class, not some Int specific isIntEqual function? :-) Regards -- Adrian Hey