diff options
author | simonpj@microsoft.com <unknown> | 2008-08-11 14:42:57 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2008-08-11 14:42:57 +0000 |
commit | 9bcaaaaa59acff95886ad3675677e58c43106bd2 (patch) | |
tree | 99d060ad06688130a6d7dc9975fba5af5de32fca | |
parent | dbeb4f0202a3210b17abc0e540a3a1b91e9c1196 (diff) | |
download | haskell-9bcaaaaa59acff95886ad3675677e58c43106bd2.tar.gz |
Print tidy rules in user style, to avoid gratuitous uniques
The uniques that come out in dumpStyle make it harder to compare
output in the testsuite. And the rules are tidied, so uniques
are not necessary. If you want the uniques, use -dppr-debug.
-rw-r--r-- | compiler/simplCore/SimplCore.lhs | 6 | ||||
-rw-r--r-- | compiler/specialise/SpecConstr.lhs | 3 | ||||
-rw-r--r-- | compiler/specialise/Specialise.lhs | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs index 86d3ec0a1e..5b52d2d2d7 100644 --- a/compiler/simplCore/SimplCore.lhs +++ b/compiler/simplCore/SimplCore.lhs @@ -284,7 +284,8 @@ prepareRules :: HscEnv -- (b) Rules are now just orphan rules prepareRules hsc_env@(HscEnv { hsc_dflags = dflags, hsc_HPT = hpt }) - guts@(ModGuts { mg_binds = binds, mg_deps = deps, mg_rules = local_rules }) + guts@(ModGuts { mg_binds = binds, mg_deps = deps + , mg_rules = local_rules, mg_rdr_env = rdr_env }) us = do { let -- Simplify the local rules; boringly, we need to make an in-scope set -- from the local binders, to avoid warnings from Simplify.simplVar @@ -317,7 +318,8 @@ prepareRules hsc_env@(HscEnv { hsc_dflags = dflags, hsc_HPT = hpt }) imp_rule_base = extendRuleBaseList hpt_rule_base rules_for_imps ; dumpIfSet_dyn dflags Opt_D_dump_rules "Transformation rules" - (vcat [text "Local rules", pprRules better_rules, + (withPprStyle (mkUserStyle (mkPrintUnqualified dflags rdr_env) AllTheWay) $ + vcat [text "Local rules", pprRules better_rules, text "", text "Imported rules", pprRuleBase imp_rule_base]) diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index 055f794d2e..a52de103c3 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -463,7 +463,8 @@ specConstrProgram dflags us binds endPass dflags "SpecConstr" Opt_D_dump_spec binds' dumpIfSet_dyn dflags Opt_D_dump_rules "Top-level specialisations" - (pprRules (tidyRules emptyTidyEnv (rulesOfBinds binds'))) + (withPprStyle defaultUserStyle $ + pprRules (tidyRules emptyTidyEnv (rulesOfBinds binds'))) return binds' where diff --git a/compiler/specialise/Specialise.lhs b/compiler/specialise/Specialise.lhs index a3b5dd6bed..b424e4a2e7 100644 --- a/compiler/specialise/Specialise.lhs +++ b/compiler/specialise/Specialise.lhs @@ -588,7 +588,8 @@ specProgram dflags us binds = do endPass dflags "Specialise" Opt_D_dump_spec binds' dumpIfSet_dyn dflags Opt_D_dump_rules "Top-level specialisations" - (pprRules (tidyRules emptyTidyEnv (rulesOfBinds binds'))) + (withPprStyle defaultUserStyle $ + pprRules (tidyRules emptyTidyEnv (rulesOfBinds binds'))) return binds' where |