summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2020-07-01 22:56:15 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2020-07-26 07:34:51 -0400
commit9b78d4ce2d595d8d683b150ca4db21e16ee95035 (patch)
tree1ed034cde884bb87b07265cb123a66cfcb93c7c6 /Makefile
parentfc0f6fbcd95f2dc69a8efabbee2d8a485c34cc47 (diff)
downloadhaskell-wip/negative-literals.tar.gz
Improve NegativeLiterals (#18022, GHC Proposal #344)wip/negative-literals
Before this patch, NegativeLiterals used to parse x-1 as x (-1). This may not be what the user expects, and now it is fixed: x-1 is parsed as (-) x 1. We achieve this by the following requirement: * When lexing a negative literal, it must not be preceded by a 'closing token'. This also applies to unboxed literals, e.g. -1#. See GHC Proposal #229 for the definition of a closing token. A nice consequence of this change is that -XNegativeLiterals becomes a subset of -XLexicalNegation. In other words, enabling both of those extensions has the same effect as enabling -XLexicalNegation alone.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions