GHC sometimes forgets to test for hs-boot consistency
Steps to reproduce: create your classic circular dependency:
-- A.hs-boot
module A where
-- B.hs
module B where
import {-# SOURCE #-} A
-- A.hs
module A where
import B
Now run this:
ghc -c A.hs-boot
ghc -c B.hs
ghc -c A.hs
echo "module A where x :: Bool" > A.hs-boot
ghc -c A.hs-boot
ghc -c B.hs
ghc -c A.hs
Expected result: A.hs recompiles and gives us an error that we don't implement enough.
Actual result: compilation IS NOT required. (Obviously, if you force recomp you do get an error now.)
I think the problem is checkOldIface
doesn't also look for an hi-boot file, and even if it did, we don't record the hashes from the hi-boot file in the hi file proper (they're not an immediate dependency).
Related #10333
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |