[Haskell-cafe] Breaking change to Eq accepted by Core Libraries Committee

Melanie Brown brown.m at pm.me
Sun Nov 14 19:29:51 UTC 2021

These arguments and more have already been discussed on the issue page.


Melanie Brown

On Sun, Nov 14, 2021 at 14:24, Sven Panne <svenpanne at gmail.com> wrote:

> Am So., 14. Nov. 2021 um 20:05 Uhr schrieb Olaf Klinke <olf at aatal-apotheke.de>:
>> That module defines two intervals to be equal if their bounds are
>> equal, but to be unequal only if they are disjoint.
> Well, this is simply a broken implementation. Quick question: Is the Ord instance lawful or not? Hard to tell... (at least without pencil & paper)
>> In my eyes this speaks for the proposal, because the library author would have been
>> unable to write the broken instance. [...]
> But this is an extremely weak argument for the proposal: One can easily write broken instances even with a single (==) method, e.g. violating symmetry etc. As another example: Given some e.g. Monad instance, can one quickly see if it is lawful? I very much doubt so, unless one tries to prove it. Laws of type classes are very much "outside of the Haskell language", anyway, so I see nothing special for Eq.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20211114/82d15dd0/attachment.html>

More information about the Haskell-Cafe mailing list