Fix #15423 by using pprAStmtContext
authorRyan Scott <ryan.gl.scott@gmail.com>
Fri, 20 Jul 2018 10:50:50 +0000 (12:50 +0200)
committerBen Gamari <ben@smart-cactus.org>
Tue, 31 Jul 2018 19:53:19 +0000 (15:53 -0400)
commitff839f20029b7f8742de05f7b49bf4117921db9c
tree6f9d70e2d85d2b1b2e4beb49e7a75c15fbdd9e66
parentd170083be4c8ad0ce6a3d00ce5891341fde774b8
Fix #15423 by using pprAStmtContext

Summary:
Previously, we were using `pprStmtContext` instead, which
led to error messages missing indefinite articles where they were
required.

Test Plan: make test TEST="T13242a T7786 Typeable1"

Reviewers: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15423

Differential Revision: https://phabricator.haskell.org/D4992

(cherry picked from commit 99f45e2a751dda4fdf00256d397a2932d430f3a7)
compiler/hsSyn/HsExpr.hs
testsuite/tests/ado/T13242a.stderr
testsuite/tests/indexed-types/should_fail/T7786.stderr
testsuite/tests/typecheck/should_run/Typeable1.stderr