[GHC] #10871: Implement "fat" interface files which can be directly compiled without source
GHC
ghc-devs at haskell.org
Mon Oct 19 09:48:12 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):
> We need more than that. We need to compile the indefinite package to
code when we fill its holes. So we need access to its source code in some
form.
> One way to do that is to keep the original Haskell source code (pre-cpp,
pre-everything) and typecheck it from scratch, being (a) careful to keep a
copy of the source code and (b) ever so careful to replay exactly the
front-end compiler flags that were used the first time round. We could do
this. But it's just easier to snapshot the Core bindings that we already
have in our hand. With unfoldings in interface files we already do this;
it's mainly a question of keeping all unfoldings, not just some.
So that's exactly what I think we should ''not'' do, we don't need to
record and replay anything at all because when we instantiate the package
it's a completely separate compilation.
So just to be clear, the plan for building package A & B where A has a
B-shaped hole would be:
1. typecheck A alone, install (thin) interface files
2. build B from source, install code + interface files
3. build A from source against B, install code + interface files
And any of these steps can be omitted if we've already done it before and
cached the results in the package database, which we can discover by
looking up the package key. Isn't this much simpler than saving fat
interface files? What am I missing?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10871#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list