Constr and Eq
Frederik Eaton
frederik at a5.repetae.net
Thu Dec 29 13:57:25 EST 2005
> toConstr True
True
> toConstr [()]
(:)
> toConstr True == toConstr [()]
True
> show (toConstr True) == show (toConstr [()])
False
I don't understand the utility of Constr's Eq definition. It isn't
really documented though. Why return True when the constructors being
compared are different? Am I supposed to use (show.toConstr) to
compare constructors?
Here is the documentation I could find:
data Constr
Representation of constructors
Instances
Show Constr
Eq Constr
This is ghc 6.4.1.
Thanks,
Frederik
More information about the Glasgow-haskell-bugs
mailing list