[project @ 2002-11-21 09:37:24 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcRnDriver.lhs
index d251db6..24438fa 100644 (file)
@@ -17,7 +17,7 @@ module TcRnDriver (
 
 #ifdef GHCI
 import {-# SOURCE #-} TcSplice ( tcSpliceDecls )
-import               DsMeta   ( qTyConName )
+import               DsMeta   ( templateHaskellNames )
 #endif
 
 import CmdLineOpts     ( DynFlag(..), opt_PprStyle_Debug, dopt )
@@ -486,9 +486,16 @@ tcRnThing hsc_env pcs ictxt rdr_name
        do { addMessages (head msgs_s) ; failM }
     else do {
 
-    mapM_ addMessages msgs_s ; -- Add deprecation warnings
-    mapM tcLookupGlobal names  -- and lookup up the entities
-    }}
+       -- Add deprecation warnings
+    mapM_ addMessages msgs_s ; 
+
+       -- Slurp in the supporting declarations
+    tcg_env <- importSupportingDecls (mkFVs names) ;
+    setGblEnv tcg_env $ do {
+
+       -- And lookup up the entities
+    mapM tcLookupGlobal names
+    }}}
 \end{code}
 
 
@@ -609,7 +616,7 @@ tcRnSrcDecls ds
        (rn_splice_expr, fvs) <- initRn SourceMode $
                                 addSrcLoc splice_loc $
                                 rnExpr splice_expr ;
-       tcg_env <- importSupportingDecls (fvs `addOneFV` qTyConName) ;
+       tcg_env <- importSupportingDecls (fvs `plusFV` templateHaskellNames) ;
        setGblEnv tcg_env $ do {
 
        -- Execute the splice