[commit: ghc] ghc-8.4: Fix #14578 by checking isCompoundHsType in more places (e32f582)
git at git.haskell.org
git at git.haskell.org
Fri Jan 12 21:42:32 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.4
Link : http://ghc.haskell.org/trac/ghc/changeset/e32f582783086595bc3d69a35d19a59707e2831d/ghc
>---------------------------------------------------------------
commit e32f582783086595bc3d69a35d19a59707e2831d
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Wed Dec 20 19:25:18 2017 -0500
Fix #14578 by checking isCompoundHsType in more places
Summary:
The `HsType` pretty-printer does not automatically insert
parentheses where necessary for type applications, so a function
`isCompoundHsType` was created in D4056 towards this purpose.
However, it was not used in as many places as it ought to be,
resulting in #14578.
Test Plan: make test TEST=T14578
Reviewers: alanz, bgamari, simonpj
Reviewed By: alanz, simonpj
Subscribers: simonpj, rwbarton, thomie, carter
GHC Trac Issues: #14578
Differential Revision: https://phabricator.haskell.org/D4266
(cherry picked from commit 1bd91a7ac60eba3b0c019e2228f4b2b07f8cd5ad)
>---------------------------------------------------------------
e32f582783086595bc3d69a35d19a59707e2831d
compiler/hsSyn/HsTypes.hs | 12 ++-
compiler/hsSyn/HsUtils.hs | 8 +-
testsuite/tests/deriving/should_compile/T14578.hs | 15 +++
.../tests/deriving/should_compile/T14578.stderr | 115 +++++++++++++++++++++
testsuite/tests/deriving/should_compile/all.T | 1 +
5 files changed, 145 insertions(+), 6 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e32f582783086595bc3d69a35d19a59707e2831d
More information about the ghc-commits
mailing list