; 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,
blankLine,
- 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 })
<indexterm><primary><option>-ddump-rules</option></primary></indexterm>
</term>
<listitem>
- <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"/>.
+ </para>
</listitem>
</varlistentry>
</sect2>
-<sect2>
-<title>Controlling what's going on</title>
+<sect2 id="controlling-rules">
+<title>Controlling what's going on in rewrite rules</title>
<para>
<listitem>
<para>
- 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.
</para>
</listitem>