diff options
author | simonpj <unknown> | 2005-08-09 16:58:39 +0000 |
---|---|---|
committer | simonpj <unknown> | 2005-08-09 16:58:39 +0000 |
commit | 17d0932b746599cba8f504bedf45fd5236885677 (patch) | |
tree | e335b497eecff9f4bab8f7245cf0a5b519a23ce5 /ghc/compiler/iface | |
parent | 70afe911563dcdc3e5fe4ed79fd944e6f0c64419 (diff) | |
download | haskell-17d0932b746599cba8f504bedf45fd5236885677.tar.gz |
[project @ 2005-08-09 16:58:39 by simonpj]
Wibble to loadHomeInterface for TH quoting; MERGE to STABLE
Diffstat (limited to 'ghc/compiler/iface')
-rw-r--r-- | ghc/compiler/iface/LoadIface.lhs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ghc/compiler/iface/LoadIface.lhs b/ghc/compiler/iface/LoadIface.lhs index 70e09c9624..f24cb64b81 100644 --- a/ghc/compiler/iface/LoadIface.lhs +++ b/ghc/compiler/iface/LoadIface.lhs @@ -40,7 +40,7 @@ import PrelRules ( builtinRules ) import Rules ( extendRuleBaseList, mkRuleBase ) import InstEnv ( emptyInstEnv, extendInstEnvList ) import Name ( Name {-instance NamedThing-}, getOccName, - nameModule, isInternalName, isWiredInName ) + nameModule, nameIsLocalOrFrom, isWiredInName ) import NameEnv import MkId ( seqId ) import Module ( Module, ModLocation(ml_hi_file), emptyModuleEnv, @@ -101,8 +101,14 @@ loadOrphanModules mods --------------- loadHomeInterface :: SDoc -> Name -> TcRn ModIface loadHomeInterface doc name - = ASSERT2( not (isInternalName name), ppr name <+> parens doc ) - initIfaceTcRn $ loadSysInterface doc (nameModule name) + = do { +#ifdef DEBUG + -- Should not be called with a name from the module being compiled + this_mod <- getModule + ; ASSERT2( not (nameIsLocalOrFrom this_mod name), ppr name <+> parens doc ) +#endif + initIfaceTcRn $ loadSysInterface doc (nameModule name) + } --------------- loadWiredInHomeIface :: Name -> IfM lcl () |