1
1
mirror of https://github.com/tweag/ormolu.git synced 2024-10-06 01:47:10 +03:00
ormolu/tests
mrkkrp a3a93ebfef Refactor the comment rendering code and ‘newline’
This removes (or rather puts it to a lower level) logic around “modifying
newline” because it was very hard to reason about and almost blocked my work
on fixing issue #337.

I also dropped debugging output because it's too verbose and I'm not using
it anyway.

As part of these changes I also changed now the ‘newline’ combinator works.
Now, similar to ‘space’, the second ‘newline’ in a row just tells the
rendering engine to prefix next thing with a newline, using the ‘newline’
combinator more than twice in a row has no effect.

To take full advantage of the new feature I also went through the code and
simplified some logic around outputting exact amount of newlines because now
it's harder to get things wrong, so we can be less careful with counting
newlines.
2019-09-05 16:56:43 +02:00
..
Ormolu Refactor the comment rendering code and ‘newline’ 2019-09-05 16:56:43 +02:00
Spec.hs Implement pretty printing combinators 2019-01-28 19:26:13 +01:00