
#12357: Increasing maximum constraint tuple size significantly blows up compiler allocations -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2400 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Replying to [comment:23 simonpj]:
Why/how does the `TcTypeable` impl rely on them being there??? There jolly well ought to be a comment to say so.
It looks like my memory failed me here: `TcTypeable` relies on `primTyCons`, not `allKnownKeyNames`, to create the representations for primitive types. That being said, excluding tuples from the name cache nevertheless poses a problem for `Typeable`: Currently type representations for tuples are known key. If we exclude tuple type representations from the known key list then they will be loaded from `GHC/Tuple.hi` with the wrong unique. There are two ways of dealing with this that are immediately obvious but not terribly appealing, * Add a special encoding to the symbol table format for type rep names. However, it seems odd to add special encodings in the interface file format for such a narrow case * Add support to the `isBuiltInOcc_maybe` parser for identifying `$tc` names.
All I see is
* `knownKeyNames` used in building `knownKeyNamesMap` in `BinIface`. Waste of time having tuples in there because they are treated specially by `BinIface`.
* Initialising the name cache in `HscMain`.
And that's really it.
Yes, I agree. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12357#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler