summaryrefslogtreecommitdiff
path: root/compiler/simplCore/SimplCore.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-18 14:59:12 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-18 16:01:53 +0100
commitd4a1964300295bfe700caa89f5d28c53eb74bdef (patch)
tree2afbbf41aad8cc65c0a60d859d5cec4e56532bb2 /compiler/simplCore/SimplCore.lhs
parent51da4ee2401983359db9caad3902a98a8f505431 (diff)
downloadhaskell-d4a1964300295bfe700caa89f5d28c53eb74bdef.tar.gz
Refactor the way dump flags are handled
We were being inconsistent about how we tested whether dump flags were enabled; in particular, sometimes we also checked the verbosity, and sometimes we didn't. This lead to oddities such as "ghc -v4" printing an "Asm code" section which didn't contain any code, and "-v4" enabled some parts of "-ddump-deriv" but not others. Now all the tests use dopt, which also takes the verbosity into account as appropriate.
Diffstat (limited to 'compiler/simplCore/SimplCore.lhs')
-rw-r--r--compiler/simplCore/SimplCore.lhs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs
index f588779390..8d2a667bf6 100644
--- a/compiler/simplCore/SimplCore.lhs
+++ b/compiler/simplCore/SimplCore.lhs
@@ -497,7 +497,7 @@ simplifyExpr dflags expr
; (expr', counts) <- initSmpl dflags emptyRuleBase emptyFamInstEnvs us sz $
simplExprGently (simplEnvForGHCi dflags) expr
- ; Err.dumpIfSet dflags (gopt Opt_D_dump_simpl_stats dflags)
+ ; Err.dumpIfSet dflags (dopt Opt_D_dump_simpl_stats dflags)
"Simplifier statistics" (pprSimplCount counts)
; Err.dumpIfSet_dyn dflags Opt_D_dump_simpl "Simplified expression"
@@ -560,7 +560,7 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode)
= do { (termination_msg, it_count, counts_out, guts')
<- do_iteration us 1 [] binds rules
- ; Err.dumpIfSet dflags (dump_phase && gopt Opt_D_dump_simpl_stats dflags)
+ ; Err.dumpIfSet dflags (dump_phase && dopt Opt_D_dump_simpl_stats dflags)
"Simplifier statistics for following pass"
(vcat [text termination_msg <+> text "after" <+> ppr it_count <+> text "iterations",
blankLine,
@@ -676,7 +676,7 @@ end_iteration dflags pass iteration_no counts binds rules
= do { dumpPassResult dflags mb_flag hdr pp_counts binds rules
; lintPassResult dflags pass binds }
where
- mb_flag | gopt Opt_D_dump_simpl_iterations dflags = Just Opt_D_dump_simpl_phases
+ mb_flag | dopt Opt_D_dump_simpl_iterations dflags = Just Opt_D_dump_simpl_phases
| otherwise = Nothing
-- Show details if Opt_D_dump_simpl_iterations is on