summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2009-05-28 15:23:59 +0000
committersimonpj@microsoft.com <unknown>2009-05-28 15:23:59 +0000
commit46f02d59813499ba2aa44e7831e0b69ec6d8f25d (patch)
tree1c98798d0e1035f79fe79aeddc9e686b8bda2322 /docs
parente16df2647fde526846e4c13470250ee5b475bdd2 (diff)
downloadhaskell-46f02d59813499ba2aa44e7831e0b69ec6d8f25d.tar.gz
Fix Trac #3262: suppress name-shadow warning for _names
Adopt Max's suggestion for name shadowing, by suppressing shadowing warnings for variables starting with "_". A tiny bit of refactoring along the way.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/using.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 8b876204ec..fad30ac245 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -1175,6 +1175,11 @@ f foo = foo { x = 6 }
typographical errors that turn into hard-to-find bugs, e.g.,
in the inadvertent capture of what would be a recursive call in
<literal>f = ... let f = id in ... f ...</literal>.</para>
+ <para>The warning is suppressed for names beginning with an underscore. For example
+ <programlisting>
+ f x = do { _ignore &lt;- this; _ignore &lt;- that; return (the other) }
+ </programlisting>
+ </para>
</listitem>
</varlistentry>