Use correct source spans for EmptyCase
authorRyan Scott <ryan.gl.scott@gmail.com>
Sat, 12 May 2018 16:56:30 +0000 (12:56 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sat, 12 May 2018 16:56:30 +0000 (12:56 -0400)
commit78db41eaa806206001b80b3d225cd254435a2f83
tree75fd26d6c766c977fbfcd92feb3ec215ba1f9b8f
parentbec2e71e9869815c058dda9ebb6eb483352aa480
Use correct source spans for EmptyCase

Summary:
The parser's calculation of source spans for `EmptyCase`
expressions was a bit off, leading to some wonky-looking error
messages. Easily fixed with some uses of `comb3` and `sLL`.

Test Plan: make test TEST=T15139

Reviewers: bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie, mpickering, carter

GHC Trac Issues: #15139

Differential Revision: https://phabricator.haskell.org/D4685
compiler/parser/Parser.y
testsuite/tests/parser/should_compile/T15139.hs [new file with mode: 0644]
testsuite/tests/parser/should_compile/T15139.stderr [new file with mode: 0644]
testsuite/tests/parser/should_compile/all.T