fourmolu / fourmolu

A fourk of ormolu that uses four space indentation and allows arbitrary configuration. Don't like it? PRs welcome!
https://fourmolu.github.io/
Other
356 stars 62 forks source link

Regression with 0.5.0.0: Fix indentation after a list comprehension with infix operator #142

Closed brandonchinn178 closed 2 years ago

brandonchinn178 commented 2 years ago

Fourmolu unexpectedly changes

x =
  [1 | _ <- _]
    <> [2]

to

x =
  [1 | _ <- _]
  <> [2]

This only seems to happen with list comprehensions. This occurred when merging Ormolu 0.4.0.0; Ormolu has this correct

https://github.com/fourmolu/fourmolu/pull/138#discussion_r758708927

brandonchinn178 commented 2 years ago

@georgefst actually, I'll hold off release until this PR is merged, since this was another regression that occurred in the ormolu upgrade. Can you review the PR soon?