Constrained forall formats aligned the `.` to the left. Constrained
formats aligned the `.` to the right. This change adds consistency
between both formats.
Left indent combined with no columnized alignment represents a context
free formatting style for brittany. These tests allow this format to be
tested until inline formatting tools are available to make these files
less redundant.
Let expressions with multiple bindings automattically indent and pull
left
```
let
a = b
c = d
in foo bar baz
```
```
let
a = b
c = d
in
foo bar baz
```
```
let
a = b
c = d
in foo
bar
baz
```
```
let
a = b
c = d
in
foo
bar
baz
```
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.
Rework the cli interface (fixes#40)
- Remove `--inplace` flag and replace with `--write-mode=(display|inplace)`;
default is "display".
- Remove `-i/--input` and `-o/--output` flags
- switch to XDG path should be backwards-compatible:
- new config will be written to XDG path
- but existing config in ~/.brittany will be respected
- looks for "brittany.yaml" not only in cwd, but in parents too.
uses the first file found.
fixes#45, fixes#55
Split up annotations by top-level elements in one
go, instead of doing the filtering per top-level
element (which necessarily makes things quadratic,
or rather O(n*m) with n top-level elements and m
size of annotation map). The fixed version should
be O(log n * m), and log n is negligible.
Previously, if the input did not end with a newline
character and config had 'ppconf_hackAroundIncludes = True'
then due to using unlines/lines the output contained an
additional newline.
- one-line externals are not detected as multiline in backend
- layouting of EAsPat (when TypeApplications is disabled)
- layouting of HsTyLit (TypeApplications with literals)