ormolu icon indicating copy to clipboard operation
ormolu copied to clipboard

Idempotency issue with comment on `case` scrutinee

Open buggymcbugfix opened this issue 2 years ago • 0 comments

$  cat repro.hs
foo = case a of
  b -- comment
    -> c

$ ormolu -c repro.hs
repro.hs
@@ -1,3 +1,4 @@
  foo = case a of
-   b -> -- comment
+   b ->
+     -- comment
      c

  Formatting is not idempotent.
  Please, consider reporting the bug.

$ ormolu --version
ormolu 0.3.0.0 HEAD 06b767c8b70e60321a4debc4599127446f958e5b
using ghc-lib-parser 9.0.1.20210324

buggymcbugfix avatar Sep 22 '21 18:09 buggymcbugfix