#3866: Constr Eq instance should have better documentation or semantics
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner: dreixel
Type: bug | Status: assigned
Priority: normal | Component: libraries (other)
Version: 6.12.1 | Keywords: syb
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by dreixel):
I propose the following change:
{{{
--- | Representation of constructors
+-- | Representation of constructors. Note that for efficiency reasons
equality
+-- of 'Constr's compares only the associated 'ConstrRep' (which can be
accessed
+-- with 'constrRep'). See
<http://hackage.haskell.org/trac/ghc/ticket/3866> for
+-- an example of how this might cause unexpected behavior.
data Constr = Constr
{ conrep :: ConstrRep
, constring :: String
}}}
Patch attached.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3866#comment:2>
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