
#10871: Implement "fat" interface files which can be directly compiled without source -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: backpack 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 simonmar): First, I absolutely agree that we should be able to use Backpack without Cabal, indeed it must be so since Cabal is just a layer on top of GHC. The original intuition with Backpack was that building fully instantiated packages can work exactly as it does now - we build everything from the leaves up to the root in dependency order, no extra mechanisms are needed. Furthermore, when dealing with indefinite packages, we can generate interface files but not code. I'm still not seeing anything in this that requires fat interface files. Let me re-answer your questions: What does it mean to install an indefinite package? We install just the interface files, so that we can typecheck against it. What does it mean to install a package that instantiates an indefinite package? Just built and install it! Then we have to build the package that it instantiates, which is exactly how cabal-install works now. I think your story is more complicated. You said "GHC can manage compiling the instantiated units, since it can just resume that compilation!" but that's blurring the boundary between Cabal and GHC, since suddenly GHC has to go and compile *and install* things. I can imagine this getting really messy. Better to have Cabal manage building and installing things at the package level, like it does now. GHC will need to know when it is just typechecking something vs. compiling it against definite dependencies. Hence, Cabal will also need a new command (or something) to do this - it's a new mode of operation, and the user needs to be in control, so there's no escaping this being visible at the Cabal level, I believe. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10871#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler