[Haskell-cafe] Re: instance Eq (a -> b)

Ashley Yakeley ashley at semantic.org
Wed Apr 14 05:13:02 EDT 2010

Ivan Lazar Miljenovic wrote:
> Ashley Yakeley <ashley at semantic.org> writes:
>> On Wed, 2010-04-14 at 16:11 +1000, Ivan Miljenovic wrote:
>>> but the only way you can "prove" it in
>>> Haskell is by comparing the values for the entire domain (which gets
>>> computationally expensive)...
>> It's not expensive if the domain is, for instance, Bool.
> You didn't make such a restriction; you wanted it for _all_ function types.

That's OK. There are lots of ways of writing computationally expensive 
things in Haskell. If you really want to compare two functions over 
Word32, using my (==) is no more computationally expensive than any 
other way.

Ashley Yakeley

More information about the Haskell-Cafe mailing list