summaryrefslogtreecommitdiff
path: root/ghc/compiler/rename
diff options
context:
space:
mode:
authorsimonpj <unknown>2005-08-09 16:58:39 +0000
committersimonpj <unknown>2005-08-09 16:58:39 +0000
commit17d0932b746599cba8f504bedf45fd5236885677 (patch)
treee335b497eecff9f4bab8f7245cf0a5b519a23ce5 /ghc/compiler/rename
parent70afe911563dcdc3e5fe4ed79fd944e6f0c64419 (diff)
downloadhaskell-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/rename')
-rw-r--r--ghc/compiler/rename/RnExpr.lhs9
1 files changed, 5 insertions, 4 deletions
diff --git a/ghc/compiler/rename/RnExpr.lhs b/ghc/compiler/rename/RnExpr.lhs
index ad7ddc522b..c252080670 100644
--- a/ghc/compiler/rename/RnExpr.lhs
+++ b/ghc/compiler/rename/RnExpr.lhs
@@ -33,7 +33,7 @@ import BasicTypes ( FixityDirection(..) )
import PrelNames ( hasKey, assertIdKey, assertErrorName,
loopAName, choiceAName, appAName, arrAName, composeAName, firstAName,
negateName, thenMName, bindMName, failMName )
-import Name ( Name, nameOccName )
+import Name ( Name, nameOccName, nameIsLocalOrFrom )
import NameSet
import RdrName ( RdrName, emptyGlobalRdrEnv, extendLocalRdrEnv, lookupLocalRdrEnv )
import LoadIface ( loadHomeInterface )
@@ -528,9 +528,10 @@ rnRbinds str rbinds
\begin{code}
rnBracket (VarBr n) = do { name <- lookupOccRn n
- ; loadHomeInterface msg name -- Reason: deprecation checking asumes the
- -- home interface is loaded, and this is the
- -- only way that is going to happen
+ ; this_mod <- getModule
+ ; checkM (nameIsLocalOrFrom this_mod name) $ -- Reason: deprecation checking asumes the
+ do { loadHomeInterface msg name -- home interface is loaded, and this is the
+ ; return () } -- only way that is going to happen
; returnM (VarBr name, unitFV name) }
where
msg = ptext SLIT("Need interface for Template Haskell quoted Name")