Improve -fwarn-orphans documentation (thanks to Tim)
authorsimonpj@microsoft.com <unknown>
Thu, 14 Aug 2008 15:26:48 +0000 (15:26 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 14 Aug 2008 15:26:48 +0000 (15:26 +0000)
docs/users_guide/separate_compilation.xml
docs/users_guide/using.xml

index bc3afca..01748ae 100644 (file)
@@ -1247,7 +1247,13 @@ These considerations lead to the following definition of an orphan module:
 
 
 
-<para>GHC will warn you if you are creating an orphan module, if you add `-fwarn-orphan-modules`.
+<para>If you use the flag <option>-fwarn-orphans</option>, GHC will warn you 
+if you are creating an orphan module.
+Like any warning, you can switch the warning off with <option>-fno-warn-orphans</option>, 
+and <option>-Werror</option>
+will make the compilation fail if the warning is issued.
+</para>
+<para>
 You can identify an orphan module by looking in its interface
 file, <filename>M.hi</filename>, using the
 <link linkend="modes"><option>--show-iface</option> mode</link>.  If there is a <literal>[orphan module]</literal> on the
index 4b3024a..e26cbdd 100644 (file)
@@ -1179,7 +1179,8 @@ f foo = foo { x = 6 }
          <para>The trouble with orphans is that GHC must pro-actively read the interface
            files for all orphan modules, just in case their instances or rules
            play a role, whether or not the module's interface would otherwise 
-           be of any use.  Other things being equal, avoid orphan modules.</para>
+           be of any use.  See <xref linkend="orphan-modules"/> for details.
+            </para>
        </listitem>
       </varlistentry>