diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-06-24 17:55:53 +0530 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-09-21 22:28:29 +0530 |
commit | 8b894e8c2a8564ed7a9782567278c3ebb4aa7b91 (patch) | |
tree | a43b68f24346e55257838869992e814d4f7a1cf7 | |
parent | 6918d95a1c293e5a733f990bcd2a40a6e12d2ce3 (diff) | |
download | haskell-8b894e8c2a8564ed7a9782567278c3ebb4aa7b91.tar.gz |
Update docs for change in parsing behaviour of infix operators like in GHC 9
(cherry picked from commit d4c43df13d428b1acee2149618f8503580303486)
-rw-r--r-- | docs/users_guide/9.0.1-notes.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/users_guide/9.0.1-notes.rst b/docs/users_guide/9.0.1-notes.rst index 0e83843dd1..31488eb2ac 100644 --- a/docs/users_guide/9.0.1-notes.rst +++ b/docs/users_guide/9.0.1-notes.rst @@ -246,9 +246,15 @@ Language as ``f (-123)``, but ``x-123`` as ``(-) x 123``. Before this amendment, :extension:`NegativeLiterals` caused ``x-123`` to be parsed as ``x(-123)``. -* GHC now requires whitespace between infix operators and their arguments in - some cases where it was not previously necessary as the result of the +* GHC is now more sensitive to whitespace between infix operators and their arguments, + requiring it in some cases where it was not previously necessary as the result of the :ref:`whitespace-sensitive operator parsing proposal <https://github.com/ghc-proposals/ghc-proposals/pull/229>`. + It also affects the usage of ``!``,``~`` and ``@`` as BangPatterns, irrefutable patterns + and type applications respectively. + This means that expressions that were parsed as visible type applications + in previous versions when the ``@`` was surrounded by whitespace will now + be parsed as an operator application. + For more details see the `migration guide on the wiki <https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#whitespace-sensitive-and->`. Compiler ~~~~~~~~ |