Parenthesize (() :: Constraint) in argument position
authorRyan Scott <ryan.gl.scott@gmail.com>
Sat, 3 Mar 2018 18:48:38 +0000 (13:48 -0500)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sat, 3 Mar 2018 18:48:38 +0000 (13:48 -0500)
commit99c556d2bb0594fd718622906168d2ea25a0bf06
tree650a91fbb7a5f36d6610b1fbc143b98430a10e8a
parenta2d03c69b782212e6c476cfc1870bae493a4ac89
Parenthesize (() :: Constraint) in argument position

Summary:
A simple oversight in the pretty-printer lead to a special
case for `() :: Constraint` not being parenthesized correctly when
used in an argument position. Easily fixed with a `maybeParen`.

Test Plan: make test TEST=T14796

Reviewers: alanz, goldfire, bgamari, simonpj

Reviewed By: bgamari, simonpj

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #14796

Differential Revision: https://phabricator.haskell.org/D4408
compiler/iface/IfaceType.hs
testsuite/tests/ghci/scripts/T14796.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T14796.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T