|
Constr and Eq: msg#00164lang.haskell.glasgow.bugs
> 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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: GADTs and type synonyms, Simon Peyton-Jones |
|---|---|
| Next by Date: | RE: Constr and Eq, Ralf Lammel |
| Previous by Thread: | Re: [GHC] #414: GHC does not eforce that Main exports main, GHC |
| Next by Thread: | RE: Constr and Eq, Ralf Lammel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |