lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Formatting fails to be idempotent with fixity declarations #212

Open cronokirby opened 5 years ago

cronokirby commented 5 years ago

Given the following code snippet:

foo = 3
  where
    a = 2
    infixr 7 `bar`
    bar = (+)

on every formatting run, a new line is inserted between a and the fixity declaration, e.g. formatting twice results in 2 new lines, 3 times in 3 etc.

This seems to me to be a bug, rather than intentional formatting behavior 8^)