TH:
- We are forcing importing THSyntax.Q at every top splice now; this suffices
to get simple splices that do not involve reifyDecl or declaration
quasi-quotes to work. NB: This worked already when the construction of the
Dec term and the splice were in separated modules, but not when they are in
the same (see the regression test "TH_spliceDecl1.hs").
- The tests "TH_spliceDecl2.hs" and "TH_spliceDecl3.hs" use toplevel splices
together with quasi-quoted and reifyDecl. These currently still fail, as
importing of some of the required type constructors from THSyntax isn't
forced.
#include "HsVersions.h"
#ifdef GHCI
-import {-# SOURCE #-} TcSplice( tcSpliceDecls )
+import {-# SOURCE #-} TcSplice ( tcSpliceDecls )
+import DsMeta ( qTyConName )
#endif
import CmdLineOpts ( DynFlag(..), opt_PprStyle_Debug, dopt )
(rn_splice_expr, fvs) <- initRn SourceMode $
addSrcLoc splice_loc $
rnExpr splice_expr ;
- tcg_env <- importSupportingDecls fvs ;
+ tcg_env <- importSupportingDecls (fvs `addOneFV` qTyConName) ;
setGblEnv tcg_env $ do {
-- Execute the splice