tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
958 stars 83 forks source link

Idempotence bug with consecutive haddocks #889

Closed santiweight closed 2 years ago

santiweight commented 2 years ago

The following throws an idempotence issue on version:

ormolu 0.4.0.0 UNKNOWN UNKNOWN
using ghc-lib-parser 9.2.2.20220307

Starting with:

  -- | Foo
  -- | Foo
data Foo = Foo

gives:

-- Foo
-- | Foo
data Foo = Foo

gives:

-- Foo

-- | Foo
data Foo = Foo

Looks like an idempotence bug to me :)

amesgen commented 2 years ago

Thanks, this is a duplicate of https://github.com/tweag/ormolu/issues/816#issuecomment-968935885, which was fixed in https://github.com/tweag/ormolu/pull/837 and is part of 0.5.0.0, while you are using 0.4.0.0, so upgrading should resolve this :+1: