diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2022-10-28 00:28:07 +0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-01 12:49:10 -0400 |
commit | 30e625e6d4bdd15960edce8ecc40b85ce3d72b28 (patch) | |
tree | a661f2fe5c5f278480d02edd885c08f3fd2ebc01 /m4/fp_prog_ld_no_compact_unwind.m4 | |
parent | b7a001132202e1ebf03dd21c6c7b4cd7a24df501 (diff) | |
download | haskell-30e625e6d4bdd15960edce8ecc40b85ce3d72b28.tar.gz |
ThToHs: fix overzealous parenthesization
Before this patch, when converting from TH.Exp to LHsExpr GhcPs,
the compiler inserted more parentheses than required:
((f a) (b + c)) d
This was happening because the LHS of the function application was
parenthesized as if it was the RHS.
Now we use funPrec and appPrec appropriately and produce sensibly
parenthesized expressions:
f a (b + c) d
I also took the opportunity to remove the special case for LamE,
which was not special at all and simply duplicated code.
Diffstat (limited to 'm4/fp_prog_ld_no_compact_unwind.m4')
0 files changed, 0 insertions, 0 deletions