TH expand hack.
This commit is contained in:
parent
caab2c5c2b
commit
3f2771a079
2
Check.hs
2
Check.hs
@ -26,5 +26,5 @@ check opt fileName = withGHC $ checkIt `gcatch` handleErrMsg
|
|||||||
load LoadAllTargets
|
load LoadAllTargets
|
||||||
liftIO readLog
|
liftIO readLog
|
||||||
options
|
options
|
||||||
| expandSplice opt = ghcOpts opt
|
| expandSplice opt = ["-w:"] ++ ghcOpts opt
|
||||||
| otherwise = ["-Wall","-fno-warn-unused-do-bind"] ++ ghcOpts opt
|
| otherwise = ["-Wall","-fno-warn-unused-do-bind"] ++ ghcOpts opt
|
||||||
|
@ -38,17 +38,16 @@ initSession opt cmdOpts idirs logging = do
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
setFlags :: Options -> DynFlags -> [FilePath] -> DynFlags
|
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
|
where
|
||||||
d' = d {
|
d' = d {
|
||||||
packageFlags = ghcPackage : packageFlags d
|
packageFlags = ghcPackage : packageFlags d
|
||||||
, importPaths = idirs
|
, importPaths = idirs
|
||||||
, ghcLink = NoLink
|
, ghcLink = NoLink
|
||||||
, hscTarget = HscInterpreted
|
, hscTarget = HscInterpreted
|
||||||
, flags = if expandSplice opt then
|
, flags = flags d
|
||||||
flags d ++ [Opt_D_dump_splices]
|
|
||||||
else
|
|
||||||
flags d
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ghcPackage :: PackageFlag
|
ghcPackage :: PackageFlag
|
||||||
|
Loading…
Reference in New Issue
Block a user