
#9111: base should export Typeable instances of its promoted data constructors -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): Deriving `Typeable` automatically is exactly what `AutoDeriveTypeable` is for (see [http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html #auto-derive-typeable user manual]) Moreover the manual claims that `AutoDeriveTypeable` will also derive `Typeable` for the promoted data constructors. I think we should probably switch it on for the entire `base` package, and the chair of the core libraries committee seems to agree. That would be simpler than a lot of ad-hoc instances. (Indeed I kind of wonder '''whether it is ever useful NOT to derive `Typeable`'''? If not, we could just derive `Typeable` automatically for everything. In implementation terms it would mean we could get rid of all the instance declarations in the interface file, since they would all be there by implication.) Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9111#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler