[GHC] #10871: Implement "fat" interface files which can be directly compiled without source

GHC ghc-devs at haskell.org
Fri Oct 16 11:57:21 UTC 2015


#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):

 I completely agree that we shouldn't save source files and try to replay
 compilation from there - indeed I'm suggesting that we shouldn't
 record/replay anything at all, and just start from the cabal source
 packages each time we need to compile or typecheck.

 Maybe a simple example will help focus this discussion.  Imagine we have
 packages A and B, where A has a B-shaped hole.  We can do

 {{{
 cabal install A
 }}}

 which just typechecks A, and we can do

 {{{
 cabal install A B
 }}}

 which compiles A and B.  Now, "cabal install A B" must work and produce
 the same results regardless of whether we previously did "cabal install
 A", because cabal is just a function from source packages to compiled
 packages.  So the only thing we can do in response to "cabal install A" is
 to cache something that might be useful later, which is what the fat
 interface files are: they let us avoid some of the work that we will need
 to do in a future "cabal install A B" for any B.

 Since we have to support "cabal install A B" without a previous "cabal
 install A", there's no new functionality in saving fat interfaces.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10871#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list