TH expand hack.

This commit is contained in:
Kazu Yamamoto 2012-02-27 12:37:11 +09:00
parent caab2c5c2b
commit 3f2771a079
2 changed files with 5 additions and 6 deletions

View File

@ -26,5 +26,5 @@ check opt fileName = withGHC $ checkIt `gcatch` handleErrMsg
load LoadAllTargets
liftIO readLog
options
| expandSplice opt = ghcOpts opt
| expandSplice opt = ["-w:"] ++ ghcOpts opt
| otherwise = ["-Wall","-fno-warn-unused-do-bind"] ++ ghcOpts opt

View File

@ -38,17 +38,16 @@ initSession opt cmdOpts idirs logging = do
----------------------------------------------------------------
setFlags :: Options -> DynFlags -> [FilePath] -> DynFlags
setFlags opt d idirs = d'
setFlags opt d idirs
| expandSplice opt = dopt_set d' Opt_D_dump_splices
| otherwise = d'
where
d' = d {
packageFlags = ghcPackage : packageFlags d
, importPaths = idirs
, ghcLink = NoLink
, hscTarget = HscInterpreted
, flags = if expandSplice opt then
flags d ++ [Opt_D_dump_splices]
else
flags d
, flags = flags d
}
ghcPackage :: PackageFlag