summaryrefslogtreecommitdiff
path: root/ghc/compiler/iface
diff options
context:
space:
mode:
authorsimonpj <unknown>2005-05-05 12:39:19 +0000
committersimonpj <unknown>2005-05-05 12:39:19 +0000
commit65a95d52d7ad2a911f7c8d18b34f0b71002d448f (patch)
tree309e14581842eb24e86d984dc9309445e3eca0d6 /ghc/compiler/iface
parenteacd9d2595c8a005dbd9ee749cf4398d66d24da8 (diff)
downloadhaskell-65a95d52d7ad2a911f7c8d18b34f0b71002d448f.tar.gz
[project @ 2005-05-05 12:39:19 by simonpj]
Only compare hi-boot iface with mother module if there *is* an hi-boot iface
Diffstat (limited to 'ghc/compiler/iface')
-rw-r--r--ghc/compiler/iface/TcIface.lhs13
1 files changed, 11 insertions, 2 deletions
diff --git a/ghc/compiler/iface/TcIface.lhs b/ghc/compiler/iface/TcIface.lhs
index 5062fd9124..3addc10cfc 100644
--- a/ghc/compiler/iface/TcIface.lhs
+++ b/ghc/compiler/iface/TcIface.lhs
@@ -237,10 +237,19 @@ tcHiBootIface mod
; if not (isOneShot mode)
-- In --make and interactive mode, if this module has an hs-boot file
-- we'll have compiled it already, and it'll be in the HPT
+ --
+ -- We check wheher the interface is a *boot* interface.
+ -- It can happen (when using GHC from Visual Studio) that we
+ -- compile a module in TypecheckOnly mode, with a stable,
+ -- fully-populated HPT. In that case the boot interface isn't there
+ -- (it's been replaced by the mother module) so we can't check it.
+ -- And that's fine, because if M's ModInfo is in the HPT, then
+ -- it's been compiled once, and we don't need to check the boot iface
then do { hpt <- getHpt
; case lookupModuleEnv hpt mod of
- Just info -> return (hm_details info)
- Nothing -> return emptyModDetails }
+ Just info | mi_boot (hm_iface info)
+ -> return (hm_details info)
+ other -> return emptyModDetails }
else do
-- OK, so we're in one-shot mode.