[Haskell-cafe] Re: (flawed?) benchmark : sort
Adrian Hey
ahey at iee.org
Thu Mar 13 06:01:58 EDT 2008
Luke Palmer wrote:
> On Thu, Mar 13, 2008 at 3:02 AM, Adrian Hey <ahey at iee.org> 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
More information about the Haskell-Cafe
mailing list