For some reason `brittany` is failing to print exact for top level
splices. This may be an issue in `brittany` or `ghc-exact-print`, I'm
not sure. I've added failing tests to highlight this issue. This bug
causes `brittany` to produce syntactically invalid Haskell.
```
1) template haskell top level splice
expected: Right
{-# LANGUAGE TemplateHaskell #-}
deriveFromJSON (unPrefix "assignPost") ''AssignmentPost
but got: Right
{-# LANGUAGE TemplateHaskell #-}
deriveFromJSON (unPrefix "assignPost") ''
```
- one-line externals are not detected as multiline in backend
- layouting of EAsPat (when TypeApplications is disabled)
- layouting of HsTyLit (TypeApplications with literals)
Prevent single-line layout when it would not even be
a single line due to a comment.
This patch might be a bit over-eager in at least one
case (I think you'd get a two-line layout with a
multiway-if and a comment _after_ the where binding).
- the #16 fix is a one-liner:
Throw `nub` at spacings before pruning.
- Expr/OpApp layouting: Force single-line for children in
the params-in-multiple-lines-right-of-the-function case.
- Expr/HsIf layouting: Insert a SetBaseY to prevent
"then"/"else" being placed left of "if".
- config now uses foo_bar instead of _foo_bar;
- config now will accept missing keys;
- use latest butcher version;
- improve identity testing by moving into separate file.