ennocramer / floskell

Floskell is a flexible Haskell source code pretty printer.
BSD 3-Clause "New" or "Revised" License
178 stars 22 forks source link

Strange behavior of comments above typeclass instances #34

Closed epeery closed 5 years ago

epeery commented 5 years ago

Comments above typeclass instances indent each time the file is formatted.

asciicast

I've confirmed that this happens with other files as well.

ennocramer commented 5 years ago

Thank your for the report.

That is definitely a bug and I can reproduce here. I'm looking into it.

My minimal test case:

module Main where

-- comment
instance Foo Bar where
  foo = undefined

bar = undefined
ennocramer commented 5 years ago

Fixed in master and uploaded to Hackage.