Parenthesize nullary constraint tuples using sigPrec (#17403)
We were using `appPrec`, not `sigPrec`, as the precedence when determining whether or not to parenthesize `() :: Constraint`, which lead to the parentheses being omitted in function contexts like `(() :: Constraint) => String`. Easily fixed. Fixes #17403.
Showing
- compiler/iface/IfaceType.hs 1 addition, 1 deletioncompiler/iface/IfaceType.hs
- testsuite/tests/ghci/scripts/T17403.hs 8 additions, 0 deletionstestsuite/tests/ghci/scripts/T17403.hs
- testsuite/tests/ghci/scripts/T17403.script 2 additions, 0 deletionstestsuite/tests/ghci/scripts/T17403.script
- testsuite/tests/ghci/scripts/T17403.stdout 1 addition, 0 deletionstestsuite/tests/ghci/scripts/T17403.stdout
- testsuite/tests/ghci/scripts/all.T 1 addition, 0 deletionstestsuite/tests/ghci/scripts/all.T
testsuite/tests/ghci/scripts/T17403.hs
0 → 100644
testsuite/tests/ghci/scripts/T17403.script
0 → 100644
testsuite/tests/ghci/scripts/T17403.stdout
0 → 100644
Please register or sign in to comment