[Git][ghc/ghc][master] Document a divergence from the report in parsing function lhss.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Aug 8 20:48:03 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
a52de3cb by Andreas Klebinger at 2022-08-08T16:47:50-04:00
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

- - - - -


1 changed file:

- docs/users_guide/bugs.rst


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a52de3cbe63af21085d6237b7e540e569a9c0f2e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a52de3cbe63af21085d6237b7e540e569a9c0f2e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220808/c4bae8e6/attachment.html>


More information about the ghc-commits mailing list