elm-format
elm-format copied to clipboard
Comments should not be pulled out of necessary parens in function application arguments
Input:
x f b = f {-A-} ({-B-} 1 + 2) b
Actual output (version 0.8.5):
x f b =
f {- A -} {- B -} (1 + 2) b
Expected output:
x f b =
f {- A -} ({- B -} 1 + 2) b
This happens because the merging of the comments is not aware of the syntax context and removes the parens and merges the comments, but luckily the formatter is smart enough to know that the parens need to be added back.