Simple records are supports. The tests cover:
- single records
- multi-field types
- columnized alignment
- basic deriving
- deriving strategies
- existential quanitification
A few items block merger
- retaining comments
A few items can be deferred:
- normal types
- sum types
- Normalize spaces on type alias lhs. unnecessary spaces were
retained previously, e.g.
"type ( ( a :%: b ) c ) = (a , c)"
had non-optimal output
- Clean up separator usage
- Remove backend hacks (to some degree)
- Minor reformatting and premature optimization
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.
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
- one-line externals are not detected as multiline in backend
- layouting of EAsPat (when TypeApplications is disabled)
- layouting of HsTyLit (TypeApplications with literals)