#2528: nub not as reliable as nubBy
----------------------------+-----------------------------------------------
Reporter: jdressel | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 6.8.2
Severity: minor | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Linux |
----------------------------+-----------------------------------------------
Comment (by JeremyShaw):
Replying to [comment:2 guest]:
> (From Adrian Hey)
>
> Well there still seems to be a problem, considering the what the library
docs say about nubBy..
hrm, interesting. I am guessing that even with 'valid' Eq instances that
could be important due to laziness and bottom?
> Also, where does the H98 report say all instances of Eq must be
transitive, reflexive, symmetric, and antisymmetric? It just says "The Eq
class provides equality (==)..", whatever that might mean :-)
Well, it does not say it explicitly, but I suspect H98's usage of Eq
implicitly demands those laws be followed. Hopefully in Haskell' the laws
will not only be stated, but there will be some QuickCheck-style
properties you can use to test your own instances ;)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2528#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs