
It appears that by default I pay >50% of compile time for a feature
#14663: Deriving Typeable for enumerations seems expensive -------------------------------------+------------------------------------- Reporter: niteria | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): that I probably won't use. Yes, we debated this quite a bit. For each data type we generate a bit of static information, just Haskell data structures, to describe the type. That way, anyone (in another module) who needs `Typeable T` or `Typeable 'A0001` can have it. But mostly they don't need that, so it's wasted bloat. Another alternative is to generate those data structure on-the-fly in every client module. Before long we'd be saying "let's avoid doing that multiple times in the same module, or doing it in module M if it's already done in one of M's imports", and we'd add machinery to avoid duplication. That is all extra complexity. Maybe it's justified. It'd be interesting to know who else tripped over this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14663#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler