summaryrefslogtreecommitdiff
path: root/compiler/main/GhcMake.hs
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2013-08-27 07:52:54 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2013-08-27 08:55:49 -0400
commit6d755c08ca125d991a95fbdc3ae1dc0608b722f1 (patch)
tree2fa5350f740e1888ea3a029064f15e9d11a529e0 /compiler/main/GhcMake.hs
parent7f33152529df7bcdc73f8c67a446f984e6cef325 (diff)
downloadhaskell-6d755c08ca125d991a95fbdc3ae1dc0608b722f1.tar.gz
Pass a DynFlags argument explicitly to typecheckLoop
In the parallel upsweep, typecheckLoop has to use a different DynFlags than the one in its HscEnv argument so that the debug message in typecheckLoop will be outputted in order.
Diffstat (limited to 'compiler/main/GhcMake.hs')
-rw-r--r--compiler/main/GhcMake.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 2d6f8f5dee..e925e0648d 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -1000,7 +1000,7 @@ parUpsweep_one mod home_mod_map comp_graph_loops lcl_dflags cleanup par_sem
-- re-typecheck the loop.
hsc_env'' <- case finish_loop of
Nothing -> return hsc_env'
- Just loop -> typecheckLoop (localize_hsc_env hsc_env') $
+ Just loop -> typecheckLoop lcl_dflags hsc_env' $
map (moduleName . fst) loop
return (hsc_env'', localize_hsc_env hsc_env'')
@@ -1303,7 +1303,7 @@ Following this fix, GHC can compile itself with --make -O2.
reTypecheckLoop :: HscEnv -> ModSummary -> ModuleGraph -> IO HscEnv
reTypecheckLoop hsc_env ms graph
| Just loop <- getModLoop ms graph
- = typecheckLoop hsc_env (map ms_mod_name loop)
+ = typecheckLoop (hsc_dflags hsc_env) hsc_env (map ms_mod_name loop)
| otherwise
= return hsc_env
@@ -1319,10 +1319,9 @@ getModLoop ms graph
where
this_mod = ms_mod ms
-
-typecheckLoop :: HscEnv -> [ModuleName] -> IO HscEnv
-typecheckLoop hsc_env mods = do
- debugTraceMsg (hsc_dflags hsc_env) 2 $
+typecheckLoop :: DynFlags -> HscEnv -> [ModuleName] -> IO HscEnv
+typecheckLoop dflags hsc_env mods = do
+ debugTraceMsg dflags 2 $
text "Re-typechecking loop: " <> ppr mods
new_hpt <-
fixIO $ \new_hpt -> do