From 2b4d4dcc7f2bb1e90a7c06f111c8460b6348920a Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 16 Oct 2000 16:17:01 +0000 Subject: [PATCH] [project @ 2000-10-16 16:17:01 by simonpj] Wibbles --- ghc/compiler/main/HscTypes.lhs | 4 ++-- ghc/compiler/rename/RnIfaces.lhs | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ghc/compiler/main/HscTypes.lhs b/ghc/compiler/main/HscTypes.lhs index 9ebbbee..0d82475 100644 --- a/ghc/compiler/main/HscTypes.lhs +++ b/ghc/compiler/main/HscTypes.lhs @@ -187,8 +187,8 @@ but they are mostly elaborated elsewhere \begin{code} data VersionInfo = VersionInfo { - modVers :: Version, - fixVers :: Version, + modVers :: Version, + fixVers :: Version, ruleVers :: Version, declVers :: NameEnv Version } diff --git a/ghc/compiler/rename/RnIfaces.lhs b/ghc/compiler/rename/RnIfaces.lhs index b724e37..ad02e6d 100644 --- a/ghc/compiler/rename/RnIfaces.lhs +++ b/ghc/compiler/rename/RnIfaces.lhs @@ -696,9 +696,14 @@ that we know just what instances to bring into scope. \begin{code} getInterfaceExports :: ModuleName -> WhereFrom -> RnMG (Module, Avails) getInterfaceExports mod_name from - = loadInterface doc_str mod_name from `thenRn` \ ifaces -> - case lookupFM (iImpModInfo ifaces) mod_name of - Just (_, _, Just (mod, _, _, _, _, avails)) -> returnRn (mod, avails) + = getHomeSymbolTableRn `thenRn` \ hst -> + case lookupModuleEnvByName hst mod_name of { + Just mds -> returnRn (mdModule mds, mdExports mds) ; + + + loadInterface doc_str mod_name from `thenRn` \ ifaces -> + case lookupModuleEnv (iPST ifaces) mod_name of + Just mds -> returnRn (mdModule mod, mdExports mds) -- loadInterface always puts something in the map -- even if it's a fake where @@ -792,11 +797,14 @@ lookupFixityRn name -- right away (after all, it's possible that nothing from B will be used). -- When we come across a use of 'f', we need to know its fixity, and it's then, -- and only then, that we load B.hi. That is what's happening here. - = loadHomeInterface doc name `thenRn` \ ifaces -> - getHomeSymbolTableRn `thenRn` \ hst -> - returnRn (lookupFixityEnv hst name `orElse` - lookupFixityEnv (iPST ifaces) name) `orElse` - defaultFixity) + = getHomeSymbolTableRn `thenRn` \ hst -> + case lookupFixityEnv hst name of { + Just fixity -> returnRn fixity ; + Nothing -> + + loadHomeInterface doc name `thenRn` \ ifaces -> + returnRn (lookupFixityEnv (iPST ifaces) name `orElse` defaultFixity) + } where doc = ptext SLIT("Checking fixity for") <+> ppr name \end{code} -- 1.7.10.4