[Git][ghc/ghc][wip/negative-literals] 3 commits: T16012: Be verbose on failure.

Vladislav Zavialov gitlab at gitlab.haskell.org
Thu Jul 2 09:20:42 UTC 2020



Vladislav Zavialov pushed to branch wip/negative-literals at Glasgow Haskell Compiler / GHC


Commits:
44d6a335 by Andreas Klebinger at 2020-07-02T02:54:54-04:00
T16012: Be verbose on failure.

- - - - -
f9853330 by Ryan Scott at 2020-07-02T02:55:29-04:00
Bump ghc-prim version to 0.7.0

Fixes #18279. Bumps the `text` submodule.

- - - - -
37a35038 by Vladislav Zavialov at 2020-07-02T12:20:32+03:00
Improve NegativeLiterals (#18022, GHC Proposal #344)

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.

- - - - -


30 changed files:

- compiler/GHC/Parser/Lexer.x
- docs/users_guide/exts/negative_literals.rst
- ghc/ghc-bin.cabal.in
- libraries/base/base.cabal
- libraries/ghc-bignum/ghc-bignum.cabal
- libraries/ghc-compact/ghc-compact.cabal
- libraries/ghc-heap/ghc-heap.cabal.in
- libraries/ghc-prim/ghc-prim.cabal
- libraries/text
- testsuite/tests/ado/ado004.stderr
- testsuite/tests/backpack/should_compile/bkp16.stderr
- testsuite/tests/dependent/should_compile/T14729.stderr
- testsuite/tests/dependent/should_compile/T15743.stderr
- testsuite/tests/dependent/should_compile/T15743e.stderr
- testsuite/tests/determinism/determ021/determ021.stdout
- testsuite/tests/driver/json2.stderr
- testsuite/tests/ghci/should_run/T16012.script
- testsuite/tests/ghci/should_run/T16012.stdout
- testsuite/tests/indexed-types/should_compile/T15711.stderr
- testsuite/tests/indexed-types/should_compile/T15852.stderr
- testsuite/tests/indexed-types/should_compile/T3017.stderr
- − testsuite/tests/parser/should_compile/LexNegVsNegLit.hs
- + testsuite/tests/parser/should_compile/NegativeLiterals.hs
- testsuite/tests/parser/should_compile/all.T
- testsuite/tests/partial-sigs/should_compile/ADT.stderr
- testsuite/tests/partial-sigs/should_compile/AddAndOr1.stderr
- testsuite/tests/partial-sigs/should_compile/AddAndOr2.stderr
- testsuite/tests/partial-sigs/should_compile/AddAndOr3.stderr
- testsuite/tests/partial-sigs/should_compile/AddAndOr4.stderr
- testsuite/tests/partial-sigs/should_compile/AddAndOr5.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9134795d1c40423ce4a0a3c9dedab510ced79955...37a35038a961a3051c549d4aecc4e94588c354e5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9134795d1c40423ce4a0a3c9dedab510ced79955...37a35038a961a3051c549d4aecc4e94588c354e5
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/20200702/06bbbeff/attachment.html>


More information about the ghc-commits mailing list