summaryrefslogtreecommitdiff
path: root/ghc/docs/users_guide/using.sgml
diff options
context:
space:
mode:
authorsimonpj <unknown>2003-12-16 16:17:49 +0000
committersimonpj <unknown>2003-12-16 16:17:49 +0000
commitdaacf054782f0a9c0187c0e3b64e7c05bd173f5d (patch)
treeefb6d07120afbf0f4b2ff726edd91abe8c9238ad /ghc/docs/users_guide/using.sgml
parent064a4bf8c981c8fe135a648b08d31f940f5693c6 (diff)
downloadhaskell-daacf054782f0a9c0187c0e3b64e7c05bd173f5d.tar.gz
[project @ 2003-12-16 16:17:49 by simonpj]
Clarify warn-unused-bindings documention
Diffstat (limited to 'ghc/docs/users_guide/using.sgml')
-rw-r--r--ghc/docs/users_guide/using.sgml13
1 files changed, 11 insertions, 2 deletions
diff --git a/ghc/docs/users_guide/using.sgml b/ghc/docs/users_guide/using.sgml
index fb5f6f6644..2c8e1ca6f6 100644
--- a/ghc/docs/users_guide/using.sgml
+++ b/ghc/docs/users_guide/using.sgml
@@ -940,6 +940,13 @@ f "2" = 2
<para>Report any function definitions (and local bindings)
which are unused. For top-level functions, the warning is
only given if the binding is not exported.</para>
+ <para>A definition is regarded as "used" if (a) it is exported, or (b) it is
+ mentioned in the right hand side of another definition that is used, or (c) the
+ function it defines begins with an underscore. The last case provides a
+ way to suppress unused-binding warnings selectively. </para>
+ <para> Notice that a variable
+ is reported as unused even if it appears in the right-hand side of another
+ unused binding. </para>
</listitem>
</varlistentry>
@@ -950,8 +957,10 @@ f "2" = 2
<indexterm><primary>unused imports, warning</primary></indexterm>
<indexterm><primary>imports, unused</primary></indexterm>
- <para>Report any objects that are explicitly imported but
- never used.</para>
+ <para>Report any modules that are explicitly imported but
+ never used. However, the form <literal>import M()</literal> is
+ never reported as an unused import, because it is a useful idiom
+ for importing instance declarations, which are anonymous in Haskell.</para>
</listitem>
</varlistentry>