[Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

Roman Cheplyaka roma
Wed Oct 2 15:36:41 UTC 2013

* Stijn van Drongelen <rhymoid at gmail.com> [2013-10-02 15:46:42+0200]
> I do think something has to be done to have an Eq and Ord with more strict
> laws.
> * Operators in Eq and Ord diverge iff any of their parameters are bottom.

This outlaws the Eq instances of lists, trees, and other (co)recursive

Furthermore, in this formulation, even Eq for tuples is illegal, because

  (undefined, something) == somethingElse

is going to diverge.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131002/875a43db/attachment.pgp>

More information about the Haskell-Cafe mailing list