ormolu icon indicating copy to clipboard operation
ormolu copied to clipboard

Non-idempotence with Haddock comment before deriving clause

Open amesgen opened this issue 3 years ago • 0 comments

This snippet (minimized from here) is non-idempotent:

data A = A
  -- | B
  deriving (Eq)

to

data A = A
  deriving (-- | B
            Eq)

to

data A = A
  deriving
    ( -- | B
      Eq
    )

Expected behavior Formatting should be idempotent, but this case is tricky as the comment is an "accidental" Haddock comment (a constructor variant is commented out).

Environment Ormolu 0.2.0.0

amesgen avatar Aug 09 '21 20:08 amesgen