[GHC] #7373: When building GHC: Failed to load interface for `GHC.Fingerprint'
GHC
ghc-devs at haskell.org
Tue Jun 18 00:43:04 CEST 2013
#7373: When building GHC: Failed to load interface for `GHC.Fingerprint'
-------------------------------+--------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: libraries/base | Version: 7.6.1
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: driver/T7373 | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Comment(by simonpj):
What are the "false differences", precisely?
I understand what is happening now. In your example we have
* Package `pkg` has
* Module A depends on nothing
* Module C, depends on A and {-# SOURCE #-} B
* Module B, depends on C
* Home package has
* Module D depends on pkg:C
Now, if you compile D, it needs to load C.hi, which in turn needs the
interface for B. But because it's not in the home package (the one to
which the module D being compiled belongs), GHC assumes `pkg` is complete
compiled and doesn't track which of `B.hi` or `B.hi-boot` should be
available; it just looks for `B.hi`. In the test, you delete `B.hi` hence
the error.
I'm rather inclined to say "too bad" here. From outside, it's better to
wait for the loop to be compiled, and ''then'' compile client packages.
In the example, make D import B. Or make D import B instead of C, and
make B export all of C's exports. Or make a third module CB that imports
both C and B, and use that in client modules.
This isn't just convenience. You get better cross-module inlining once B
is compiled, so you only want to use `B.hi-boot` when there is absolutely
no alternative, ie while compiling modules that form part of the cycle.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7373#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list