[commit: ghc] ghc-parmake-gsoc: Pass a DynFlags argument explicitly to typecheckLoop (6d755c0)

git at git.haskell.org git at git.haskell.org
Tue Aug 27 16:11:55 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-parmake-gsoc
Link       : http://ghc.haskell.org/trac/ghc/changeset/6d755c08ca125d991a95fbdc3ae1dc0608b722f1/ghc

>---------------------------------------------------------------

commit 6d755c08ca125d991a95fbdc3ae1dc0608b722f1
Author: Patrick Palka <patrick at parcs.ath.cx>
Date:   Tue Aug 27 07:52:54 2013 -0400

    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.


>---------------------------------------------------------------

6d755c08ca125d991a95fbdc3ae1dc0608b722f1
 compiler/main/GhcMake.hs |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 2d6f8f5..e925e06 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





More information about the ghc-commits mailing list