Improve treatment of sectioned holes
authorRyan Scott <ryan.gl.scott@gmail.com>
Thu, 21 Dec 2017 00:25:53 +0000 (19:25 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 18 Jan 2018 18:27:11 +0000 (13:27 -0500)
commitda83722c503a2f032bf21b386b8021c0794d4176
tree5ef0a67d0c07f202c7055909dd7497348ac4d06c
parent3e3a096885c0fcd0703edbeffb4e47f5cbd8f4cc
Improve treatment of sectioned holes

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

(cherry picked from commit 4d41e9212d1fdf109f2d0174d204644446f5874c)
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