chrisdone/hindent — pull request #8 by gibiansky (2014-10-15 05:50:34+00:00)
Title: Additional style tests and hindent tweaking

This PR adds several new test files and implements everything necessary to deal with them. The following is a summary of the changes:

- Tweak fixities of operators before passing parse tree to the formatter. This allows us to properly format applicative operators, as long as we are only using binary operators from `base`.
- Added `defaultConfig`, because I needed to add a field.
- Added a field to `Config` called `configClearEmptyLines`, which controls whether to insert spaces for indentation for two consecutive newlines.
- Added many changes to my own style, including:
- Add applicative parsing for long lines.
- Respecting user-set spacing between bindings in a `where`.
- Allow formatting several imports at once; insert newlines between them.
- Allow formatting a type declaration with the declaration after it.
- Probably some other things too.

Let me know if there's anything I should change in order for this to merge. I think this is almost ready for my own use, and is getting to the point where it almost perfectly mirrors the code I write. (I'd like to implement some alignment for some uses of `->` and some uses of `--` comments, and then will need to test it extensively in practice and with whole-module reformatting...)