- Finish consolidation, clearing a TODO
- Fix two comment placement issues around record wildcards
- Fix regression in brittany-0.12 about layouting large
(multiline) record field updates
Both record construction and record layouting have very similar
constructions. These each had their own layouter with slightly different
variations. Variations here lead to subtley different bugs in layout for
nearly identicle syntactic forms.
The record update logic is more advanced and respects `IndentPolicyLeft`.
Instead of keeping these layouters distinct we can consolidate
construction logic into the update logic. This results in a smaller
volume of code and more uniform layouting of syntax for these simlilar
forms.
Record constructors with fields and wildcards are not included in this
consolidation. A TODO has been left to handle this consolidation later.
During alt-transform, when gather spacings, previously
we tracked different non-bottom spacings separately even
though they would be treated in the same way during any
future transformations (apart from certain exceptions that
don't practically give better results). Instead we now
merge such spacings into one, giving more space for other
spacings when pruning to the spacings limit.
Arguments of two function applications will only be aligned
if the same function is called in both cases.
The column transform was altered slightly to fix#65
properly as well.
fixes#65, #128
This commit changes infix patterns to utilize `lrdrNameToTextAnn`. This
function allows the logic to avoid introspecting on the constructor
name.
Additionally this adds spaces to all infix operator pattern matches.
Previously infix symbols did not include spaces:
```
foo (x:xs) = _
```
Now they include a space
```
foo (x : xs) = _
```
This fix does not work on ghc-8.0, because I do not understand
the 8.0 API in this instance. Could be resolved by looking
at annotations, but that really should not be necessary.