Skip to content

Idempotency issue involving operators and case #785

@buggymcbugfix

Description

@buggymcbugfix
$ cat repro.hs
foo = a &&
    b
    <> case d of
         e -> e
    && f

$ ormolu -c repro.hs
repro.hs
@@ -3,4 +3,4 @@
      && b
      <> case d of
        e -> e
-       && f
+     && f

  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

This is the smallest repro i could find. When changing && to <>, the issue does not reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcommentsIssues related to comment placementidempotenceIdempotence issues and solutions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions