Use sigPrec in more places in Convert and HsUtils
authorRyan Scott <ryan.gl.scott@gmail.com>
Tue, 15 Jan 2019 02:45:17 +0000 (21:45 -0500)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Mon, 28 Jan 2019 17:23:16 +0000 (12:23 -0500)
commitb1e569a54085bf1093b4f858f8c7c739e3be769b
tree499199793dc7aa1f6b3b6212b5ffca9c39df31d4
parent77974922eb4390899cb151de840308c5fe87949b
Use sigPrec in more places in Convert and HsUtils

Trac #16183 was caused by TH conversion (in `Convert`) not properly
inserting parentheses around occurrences of explicit signatures where
appropriate, such as in applications, function types, and type family
equations. Solution: use `parenthesizeHsType sigPrec` in these
places. While I was in town, I also updated `nlHsFunTy` to do the
same thing.
compiler/hsSyn/Convert.hs
compiler/hsSyn/HsUtils.hs
testsuite/tests/th/T12045TH1.stderr
testsuite/tests/th/T16183.hs [new file with mode: 0644]
testsuite/tests/th/T16183.stderr [new file with mode: 0644]
testsuite/tests/th/all.T