#4387: Huge executables with GHC 7 ----------------------------------+----------------------------------------- Reporter: daniel.is.fischer | Owner: igloo Type: bug | Status: new Priority: highest | Milestone: 7.0.1 Component: Compiler | Version: 7.1 Keywords: executable size | Testcase: Blockedby: | Difficulty: Os: Linux | Blocking: Architecture: x86 | Failure: Other ----------------------------------+-----------------------------------------
Comment(by simonpj): Ah.. light dawns. Every module has a module-initialisation routine. Apart from initialising the module, it calls the module-initialisation routine for each imported module. So if M imports module `SpecConstr` from package `ghc`, then the module-initialisatin routine for M will call the initialisation routine for `SpecConstr`. Even though nothing from `SpecConstr` is ultimately used. Hmm. That is bad. I'm not sure what to do about it. The obvious alternative is to call the module-init routine for each `Id` mentioned in the final executable for M. That would solve the problem, but at a cost: every module will call zillions of module initialisers. Simon -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4387#comment:24> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs