#4387: Huge executables with GHC 7 ----------------------------------+----------------------------------------- Reporter: daniel.is.fischer | Owner: igloo Type: bug | Status: new Priority: normal | Milestone: 7.0.1 Component: Compiler | Version: 7.1 Keywords: executable size | Testcase: Blockedby: | Difficulty: Os: Linux | Blocking: Architecture: x86 | Failure: Other ----------------------------------+-----------------------------------------
Comment(by batterseapower): Having a better solution for "compile time imports" would also prevent GHC from linking in modules that are import only for their type information (e.g. a type-level natural numbers package). We could also extend it so we get a better solution to the outstanding annoying problem where you have to remember to call `hs_init` and `hs_add_root` when building a C program that links in some Haskell. We can just arrange that hs_init is marked as a constructor for collect2's purposes. This will cause libgcc library to call hs_init for you (via __main), along with the module initialisers. This means that if you build your Haskell-importing C program using the GNU toolchain, then you don't have to worry about starting up the Haskell RTS at all. In particular this means you could write a Haskell library that behaves as a drop-in replacement for a C library. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4387#comment:31> 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