From 6b53962684d726b8d5c6cd84d0e66904fc9bac99 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Tue, 10 Nov 2009 17:10:40 +0000 Subject: [PATCH] Make -dverbose-core2core set verbosity = 2 This ensures that messages coming out with -dshow-passes also come out with -dverbose-core2core --- compiler/main/DynFlags.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 53be2e9..862e064 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -344,7 +344,7 @@ data DynFlags = DynFlags { hscTarget :: HscTarget, hscOutName :: String, -- ^ Name of the output file extCoreName :: String, -- ^ Name of the .hcr output file - verbosity :: Int, -- ^ Verbosity level: see "DynFlags#verbosity_levels" + verbosity :: Int, -- ^ Verbosity level: see Note [Verbosity levels] optLevel :: Int, -- ^ Optimisation level simplPhases :: Int, -- ^ Number of simplifier phases maxSimplIterations :: Int, -- ^ Max simplifier iterations @@ -730,9 +730,8 @@ defaultDynFlags = } {- - #verbosity_levels# - Verbosity levels: - +Note [Verbosity levels] +~~~~~~~~~~~~~~~~~~~~~~~ 0 | print errors & warnings only 1 | minimal verbosity: print "compiling M ... done." for each module. 2 | equivalent to -dshow-passes @@ -1475,7 +1474,8 @@ dynamic_flags = [ Supported , Flag "dsource-stats" (setDumpFlag Opt_D_source_stats) Supported - , Flag "dverbose-core2core" (NoArg setVerboseCore2Core) + , Flag "dverbose-core2core" (NoArg (do { setVerbosity (Just 2) + ; setVerboseCore2Core })) Supported , Flag "dverbose-stg2stg" (setDumpFlag Opt_D_verbose_stg2stg) Supported @@ -2029,7 +2029,8 @@ unSetDynFlag f = upd (\dfs -> dopt_unset dfs f) -------------------------- setDumpFlag :: DynFlag -> OptKind DynP setDumpFlag dump_flag - = NoArg (setDynFlag dump_flag >> when want_recomp forceRecompile) + = NoArg (do { setDynFlag dump_flag + ; when want_recomp forceRecompile }) where -- Certain dumpy-things are really interested in what's going -- on during recompilation checking, so in those cases we -- 1.7.10.4