#1351: mistake in Data.Set description
------------------------------+---------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Documentation | Version: 6.6.1
Severity: trivial | Resolution: fixed
Keywords: | Difficulty: Unknown
Os: Windows | Testcase:
Architecture: x86 |
------------------------------+---------------------------------------------
Changes (by igloo):
* resolution: => fixed
* status: new => closed
Comment:
The example below shows why this can make a difference; I've addded it to
the docs in the HEAD.
{{{
import qualified Data.Set as S
data AB = A | B deriving Show
instance Ord AB where compare _ _ = EQ
instance Eq AB where _ == _ = True
main = print (S.singleton A `S.intersection` S.singleton B,
S.singleton B `S.intersection` S.singleton A)
}}}
prints ```(fromList [A],fromList [B])```.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1351>
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