floskell
floskell copied to clipboard
Extra blank line between type signature and definition when separated by comment
I'm not sure if this is intentional, but it seems unnecessary to me, and I didn't see an option to prevent this.
f :: ()
--
f = ()
becomes
f :: ()
--
f = ()
and
f :: () -- ^
f = ()
becomes
f :: () -- ^
f = ()
This also seems inconsistent with not having a blank line before a comment on successive patterns:
f :: Bool -> ()
--
f True = ()
--
f False = ()
This is indeed not intentional, but a result of the extremely simple spacing heuristic. The code simply sees the type signature and definition to not be adjacent and thus inserts an empty line. It does not realize that the space was actually filled with a comment and it's thus inserting a vertical separation that wasn't there before.
This was fixed in floskell-0.10.6.