#ifdef GHCI
import {-# SOURCE #-} TcSplice ( tcSpliceDecls )
-import DsMeta ( qTyConName )
+import DsMeta ( templateHaskellNames )
#endif
import CmdLineOpts ( DynFlag(..), opt_PprStyle_Debug, dopt )
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}
(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