Commit 23bc35d6 authored by's avatar

Improve dumping for rules, and documentation of same

Inspired by Trac #3703
parent f4b72748
......@@ -323,9 +323,9 @@ prepareRules hsc_env@(HscEnv { hsc_dflags = dflags, hsc_HPT = hpt })
; Err.dumpIfSet_dyn dflags Opt_D_dump_rules "Transformation rules"
(withPprStyle (mkUserStyle (mkPrintUnqualified dflags rdr_env) AllTheWay) $
vcat [text "Local rules", pprRules simpl_rules,
vcat [text "Local rules for local Ids", pprRules simpl_rules,
text "Imported rules", pprRuleBase hpt_rule_base])
text "Local rules for imported Ids", pprRuleBase hpt_rule_base])
; return (hpt_rule_base, guts { mg_binds = binds_w_rules,
mg_rules = rules_for_imps })
......@@ -120,8 +120,9 @@
<para>dumps all rewrite rules (including those generated
by the specialisation pass)</para>
<para>dumps all rewrite rules specified in this module;
see <xref linkend="controlling-rules"/>.
......@@ -8605,8 +8605,8 @@ comparison.
<title>Controlling what's going on</title>
<sect2 id="controlling-rules">
<title>Controlling what's going on in rewrite rules</title>
......@@ -8614,7 +8614,10 @@ comparison.
Use <option>-ddump-rules</option> to see what transformation rules GHC is using.
Use <option>-ddump-rules</option> to see the rules that are defined
<emphasis>in this module</emphasis>.
This includes rules generated by the specialisation pass, but excludes
rules imported from other modules.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment