Improve treatment of sectioned holes
authorRyan Scott <ryan.gl.scott@gmail.com>
Thu, 21 Dec 2017 00:25:53 +0000 (19:25 -0500)
committerRyan Scott <ryan.gl.scott@gmail.com>
Thu, 21 Dec 2017 00:25:54 +0000 (19:25 -0500)
commit4d41e9212d1fdf109f2d0174d204644446f5874c
tree50982afd40fe890533aef721a2ae4c756bf16ff4
parentb6304f8fd9b845466116874db4224f42acbc597d
Improve treatment of sectioned holes

Summary:
Previously, GHC was pretty-printing left-section holes
incorrectly and not parsing right-sectioned holes at all. This patch
fixes both problems.

Test Plan: make test TEST=T14590

Reviewers: bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie, mpickering, carter

GHC Trac Issues: #14590

Differential Revision: https://phabricator.haskell.org/D4273
compiler/hsSyn/HsExpr.hs
compiler/parser/Parser.y
testsuite/tests/typecheck/should_compile/T14590.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T14590.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T