Evan Rutledge Borden
f3c37a6abf
Update pending long argument test to context free.
2017-11-27 18:12:19 +01:00
Evan Rutledge Borden
cd9f7de566
Update pending type operator test for context free.
2017-11-27 18:12:19 +01:00
Evan Rutledge Borden
3bbf81baab
Add literate tests for context free formatting
...
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.
2017-11-27 18:12:19 +01:00
Lennart Spitzner
26f8cdfb65
Support RecursiveDo/`rec` keyword
2017-10-24 00:25:59 +02:00
Lennart Spitzner
338beb8eea
Move testcases for extensions in separate testfile
2017-10-24 00:15:53 +02:00
Lennart Spitzner
b1c6be7acd
Fix parentheses around kind signatures, fixes #64
2017-10-15 00:23:14 +02:00
Lennart Spitzner
f86665a251
Fix promoted HsTyVars on ghc-8.2.1
...
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.
2017-10-14 23:21:13 +02:00
Lennart Spitzner
a0112524aa
Split up littests input into multiple files
...
*.blt instead of just tests.blt
yay for unix-style for ordering the inputs "15-regression.blt"
2017-10-02 20:53:56 +02:00
Lennart Spitzner
ccf2eb092f
Support RecordWildCards, Add one-liner layouting for records
...
fixes #52
2017-10-01 17:24:13 +02:00
Lennart Spitzner
ca13a1897f
Fix type application layouting ( fixes #48 )
...
- one-line externals are not detected as multiline in backend
- layouting of EAsPat (when TypeApplications is disabled)
- layouting of HsTyLit (TypeApplications with literals)
2017-08-20 14:09:03 +02:00
Lennart Spitzner
fba8ad1a99
Fix negative literals in patterns ( fixes #49 )
2017-08-20 00:34:13 +02:00
Lennart Spitzner
655074d1c0
Fix comment insertion error introduced in 91b9a240
2017-08-10 13:09:39 +02:00
Lennart Spitzner
91b9a240f1
Fix comment-before-BDCols issue; Relax alignmentBreakOnMultiline
2017-08-07 00:35:09 +02:00
Lennart Spitzner
00ad6c71b9
Impl. layouting of TypeApplication, fixes #38
2017-07-28 18:03:21 +02:00
Lennart Spitzner
6268b8075a
Fix layouting bug for RecordUpd
2017-07-04 23:57:54 +02:00
Lennart Spitzner
5a82968a7b
Add sub-config-alternative default to lib interface
...
i.e. `forwardOptionsSyntaxExtsEnabled`
2017-07-04 23:26:13 +02:00
Lennart Spitzner
cece70380c
Fix/Implement proper layouting of MultiWayIf
2017-06-28 23:35:02 +02:00
Lennart Spitzner
6d472315e3
Fix layouting special-case (getSpacing(s) internals)
2017-06-04 18:15:22 +02:00
Lennart Spitzner
5e3cc0a7c3
Fix OpApp layouting/indentation annoyance
2017-06-04 16:28:01 +02:00
Lennart Spitzner
3784a0123b
Refactor exposed function (now parsePrintModule)
...
- Rename parsePrintModule -> parsePrintModuleTests
- Rename pureModuleTransform -> parsePrintModule
- Change argument type from (CConfig Option) to Config
- Expose CConfig type fully
2017-06-03 18:23:03 +02:00
Lennart Spitzner
f350113f7f
Refactor all modules: +Internal; Add public Brittany module
2017-05-22 21:25:08 +02:00
Lennart Spitzner
8f1e366f9c
Change config file structure; Add config version tag
2017-05-21 16:48:05 +02:00
Lennart Spitzner
4ee44388f7
Improve layouting for OpApp (special-case for dollar/HsVar)
2017-05-21 13:43:39 +02:00
Lennart Spitzner
8b7b1334e2
Fix forall type signature layouting
2017-05-18 14:18:10 +02:00
Lennart Spitzner
83ba7803e6
Fix layouting issues in lists/listcomprehension
2017-05-17 23:31:20 +02:00
Lennart Spitzner
6448ee780a
Restrict aggressive horizontal alignment ( fixes #21 )
...
- Add config values:
_lconfig_alignmentLimit for roughly "max spaces inserted"
_lconfig_alignmentBreakOnMultiline for stopping
alignment after non-singleline-items
2017-05-17 21:34:49 +02:00
Lennart Spitzner
c701e5d00b
Fix #26 : Fix comment glitch in patternbind layouting
...
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).
2017-05-02 17:10:04 +02:00
Lennart Spitzner
c3dc3b6074
And one more touch to ExplicitList
2017-05-02 16:32:43 +02:00
Lennart Spitzner
ca42178eff
Improve tuple layouting (also fixes #18 for tuples)
2017-05-02 16:21:13 +02:00
Lennart Spitzner
f6324da600
Fix ExplicitList comment insertion ( fixes #18 )
2017-05-02 14:20:58 +02:00
Lennart Spitzner
505ad99f35
Handle InlineSig construct (pragma), fixes #20
2017-04-12 21:47:59 +02:00
Lennart Spitzner
acbaba0782
Omit output syntax test for fix-point tests
2017-04-12 14:53:47 +02:00
Lennart Spitzner
a7e4bdc168
Fix #16 ; Improve layouting in two cases; Add comments
...
- 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".
2017-03-16 23:02:11 +01:00
Lennart Spitzner
7dc6c525eb
Fix minor layouting issue with long guards
...
(see test multiple-clauses-4)
2017-03-07 21:44:28 +01:00
Lennart Spitzner
cea81d5369
Add indentation to the paragraphs inserted in patterns
...
Ugly, but fixes #6 . Ugly still better than non-valid-haskell result.
2017-03-06 16:56:38 +01:00
Lennart Spitzner
8d163eb099
Improve layouting for equations with multiple clauses
...
e.g.
func x | x = simple expression
| otherwise = 0
This fixes part of #7
2017-03-06 16:03:47 +01:00
Lennart Spitzner
0a907c5594
Add some pending issues testcases
2017-03-01 22:04:41 +01:00
Lennart Spitzner
93611b9a1c
Apply brittany
2017-01-31 18:44:39 +01:00
Lennart Spitzner
bc70eb07e8
Change config setup(!), Refactor, Update deps
...
- 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.
2017-01-31 18:43:16 +01:00