summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2022-08-05 12:44:23 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-08 16:47:50 -0400
commita52de3cbe63af21085d6237b7e540e569a9c0f2e (patch)
treef83269a45839f8e312db923f16757b9d92f4fe62 /docs
parent1504a93eecfc9efb3e6d2bda492d811dc32b6122 (diff)
downloadhaskell-a52de3cbe63af21085d6237b7e540e569a9c0f2e.tar.gz
Document a divergence from the report in parsing function lhss.
GHC is happy to parse `(f) x y = x + y` when it should be a parse error based on the Haskell report. Seems harmless enough so we won't fix it but it's documented now. Fixes #19788
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/bugs.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/users_guide/bugs.rst b/docs/users_guide/bugs.rst
index a60bb493e5..2a4de4c4be 100644
--- a/docs/users_guide/bugs.rst
+++ b/docs/users_guide/bugs.rst
@@ -115,6 +115,10 @@ Lexical syntax
varid → small {idchar} ⟨reservedid⟩
conid → large {idchar}
+- GHC allows redundant parantheses around the function name in the `funlhs` part of declarations.
+ That is GHC will succeed in parsing a declaration like `((f)) x = <rhs>` for any number
+ of parantheses around `f`.
+
.. _infelicities-syntax:
Context-free syntax