[Haskell-cafe] Does GHC compare pointers when eval'ing (==)
johan.tibell at gmail.com
Wed Aug 20 08:28:55 UTC 2014
On Wed, Aug 20, 2014 at 10:23 AM, Erik Hesselink <hesselink at gmail.com>
> As I understood, the question was if GHC would first compare pointers,
> and only call the Eq instance if the pointers are not equal. I guess
> this would be safe, but I don't think GHC does such a thing.
I think the reason it isn't done is that it's not always an optimization.
We do it manually in e.g. bytestring.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe