Commit 62d13377 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Document -fwarn-auto-orphans

parent cc047084
......@@ -1301,11 +1301,11 @@
</row>
<row>
<entry><option>-fwarn-orphans</option></entry>
<entry><option>-fwarn-orphans, -fwarn-auto-orphans</option></entry>
<entry>warn when the module contains <link linkend="orphan-modules">orphan instance declarations
or rewrite rules</link></entry>
<entry>dynamic</entry>
<entry><option>-fno-warn-orphans</option></entry>
<entry><option>-fno-warn-orphans, -fno-warn-auto-orphans</option></entry>
</row>
<row>
......
......@@ -1419,13 +1419,14 @@ module M where
</varlistentry>
<varlistentry>
<term><option>-fwarn-orphans</option>:</term>
<term><option>-fwarn-orphans, -fwarn-auto-orphans</option>:</term>
<listitem>
<indexterm><primary><option>-fwarn-orphans</option></primary></indexterm>
<indexterm><primary><option>-fwarn-auto-orphans</option></primary></indexterm>
<indexterm><primary>orphan instances, warning</primary></indexterm>
<indexterm><primary>orphan rules, warning</primary></indexterm>
<para>This option causes a warning to be emitted whenever the
<para>These flags cause a warning to be emitted whenever the
module contains an "orphan" instance declaration or rewrite rule.
An instance declaration is an orphan if it appears in a module in
which neither the class nor the type being instanced are declared
......@@ -1437,6 +1438,11 @@ module M where
play a role, whether or not the module's interface would otherwise
be of any use. See <xref linkend="orphan-modules"/> for details.
</para>
<para>The flag <option>-fwarn-orphans</option> warns about user-written
orphan rules or instances. The flag <option>-fwarn-auto-orphans</option>
warns about automatically-generated orphan rules, notably as a result of
specialising functions, for type classes (<literal>Specialise</literal>)
or argument values (<literal>SpecConstr</literal>).</para>
</listitem>
</varlistentry>
......
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