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 1bd91a7a)
Showing
- compiler/hsSyn/HsTypes.hs 10 additions, 2 deletionscompiler/hsSyn/HsTypes.hs
- compiler/hsSyn/HsUtils.hs 4 additions, 4 deletionscompiler/hsSyn/HsUtils.hs
- testsuite/tests/deriving/should_compile/T14578.hs 15 additions, 0 deletionstestsuite/tests/deriving/should_compile/T14578.hs
- testsuite/tests/deriving/should_compile/T14578.stderr 115 additions, 0 deletionstestsuite/tests/deriving/should_compile/T14578.stderr
- testsuite/tests/deriving/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/deriving/should_compile/all.T
Please register or sign in to comment