Ticket #5962 (closed bug: fixed)
Data.Typeable: types which should compare equal don't
| Reported by: | NickSmallbone | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.4.3 |
| Component: | libraries/base | Version: | 7.4.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Incorrect result at runtime | Difficulty: | Unknown |
| Test Case: | base/tests/T5962 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
Here are two ways to construct a TypeRep? for the type () -> ():
Prelude> import Data.Typeable Prelude Data.Typeable> let unitToUnit = typeOf (\() -> ()) Prelude Data.Typeable> let unitToUnit' = mkFunTy (typeOf ()) (typeOf ())
It seems to work:
Prelude Data.Typeable> unitToUnit () -> () Prelude Data.Typeable> unitToUnit' () -> ()
But the two TypeReps? are not equal:
Prelude Data.Typeable> unitToUnit == unitToUnit' False
Change History
Note: See
TracTickets for help on using
tickets.
