summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-09-19 16:44:29 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2015-09-20 21:39:16 -0400
commit27f9186d8e35387c3f48f848ff3b2c8e967a9c97 (patch)
tree5db851877abac7e2669828aa937aecdfe90c4b1c /docs
parent1292c17e61400dfa0c27eddff4bea6a935006657 (diff)
downloadhaskell-27f9186d8e35387c3f48f848ff3b2c8e967a9c97.tar.gz
Clarify parsing infelicity.
This fixes #10855.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/bugs.xml14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/users_guide/bugs.xml b/docs/users_guide/bugs.xml
index 1b4d5c93a2..bff2bcf056 100644
--- a/docs/users_guide/bugs.xml
+++ b/docs/users_guide/bugs.xml
@@ -101,13 +101,25 @@ main = do args &lt;- getArgs
<programlisting>
(let x = 42 in x == 42 == True)</programlisting></para>
</listitem>
+
+ <listitem>
+ <para>The Haskell Report allows you to put a unary
+ <literal>-</literal> preceding certain expressions headed by
+ keywords, allowing constructs like <literal>- case x of
+ ...</literal> or <literal>- do { ... }</literal>. GHC does
+ not allow this. Instead, unary <literal>-</literal> is
+ allowed before only expressions that could potentially
+ be applied as a function.
+ </para>
+ </listitem>
+
</itemizedlist>
</sect3>
<sect3 id="infelicities-exprs-pats">
<title>Expressions and patterns</title>
- <para>In its default mode, GHC makes some programs slightly more defined
+ <para>In its default mode, GHC makes some programs slightly more defined
than they should be. For example, consider
<programlisting>
f :: [a] -> b -> b