Make renamer to be more flexible with parens in the LHS of the rules
We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621
Showing
- compiler/GHC/Rename/Module.hs 11 additions, 0 deletionscompiler/GHC/Rename/Module.hs
- testsuite/tests/rename/should_compile/T24621_normal.hs 12 additions, 0 deletionstestsuite/tests/rename/should_compile/T24621_normal.hs
- testsuite/tests/rename/should_compile/T24621_th.hs 12 additions, 0 deletionstestsuite/tests/rename/should_compile/T24621_th.hs
- testsuite/tests/rename/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/rename/should_compile/all.T
Please register or sign in to comment