Commit Graph

32 Commits (89b7655bac0e0ff8ac9a2f6f23bcff9f77a151af)

Author SHA1 Message Date
Lennart Spitzner 6879436e67 Fix lambdas with lazy/bang pattern as first argument 2019-09-03 01:10:38 +02:00
Lennart Spitzner 702b993dab Fix prefix operator pattern-match invalid result 2019-09-03 00:23:58 +02:00
Lennart Spitzner 91d6e18aba Adapt to ghc-8.8 (deps are not ready though) 2019-09-02 17:04:44 +02:00
Lennart Spitzner 3288ef3bd4 For funs with multiple matches, use the match id as id (fixes #234) 2019-06-16 22:51:18 +02:00
Lennart Spitzner 09a227fcce Add quick regression-test for fixed issue 2019-06-05 20:12:28 +02:00
Evan Rutledge Borden 92a1d89983 Consolidate record expression layouter
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.
2018-09-16 15:47:04 -04:00
Lennart Spitzner ab27825b7b Core layouting algo improvement (non-bottom more effective)
During alt-transform, when gather spacings, previously
we tracked different non-bottom spacings separately even
though they would be treated in the same way during any
future transformations (apart from certain exceptions that
don't practically give better results). Instead we now
merge such spacings into one, giving more space for other
spacings when pruning to the spacings limit.
2018-07-06 22:41:31 +02:00
Lennart Spitzner 3c5670d5cd Fix layouting for OpApps with comments (fixes 159) 2018-07-05 21:31:28 +02:00
Lennart Spitzner bdee27cb59 Add spaces around record braces (single-line) (fixes #126) 2018-05-25 17:57:54 +02:00
Lennart Spitzner ef7b0fcc70 Add test for #144 2018-05-16 21:25:40 +02:00
Lennart Spitzner e9aacb27ff Implement hacky workaround for issue 89 2018-04-25 19:54:35 +02:00
Lennart Spitzner 315a7e1ee1 Fix overflowing due to alignment; Add docs (alignment algorithm) 2018-04-23 19:33:04 +02:00
Lennart Spitzner b43ee43220 Fix/Implement empty type constraint handling (fixes #133) 2018-04-02 17:11:53 +02:00
Lennart Spitzner 0845142727 Fix let-in comment placement bug (fixes #110) 2018-03-23 17:34:36 +01:00
Lennart Spitzner bdd3b155f3 Fix HsPar comment placement bug (see #111) 2018-03-23 17:11:39 +01:00
Lennart Spitzner 3847325fd5 Omit single-line layout for OpApp with comments (fixes #111) 2018-03-23 17:02:58 +01:00
Lennart Spitzner a003b932a9 Fix comments in tuples being dropped (fixes #37) 2018-03-23 16:55:28 +01:00
Lennart Spitzner 90a2f65ba7 Align applications on for same function, plus minor fixup
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
2018-03-22 01:19:56 +01:00
Lennart Spitzner 1330aeb6b4 Fix ticked type operator losing tick (fixes #125) 2018-03-13 23:51:22 +01:00
Lennart Spitzner 19e31fdaf2 Improve layouting of RecordUpd, Fix minor issue for HsLet 2018-02-19 21:33:43 +01:00
Lennart Spitzner 55b1c71bf3 Fix a layouting mistake that went unnoticed so far 2018-02-14 01:00:01 +01:00
Lennart Spitzner 91de1ca08c Fix bang deletion on ghc-8.2, Add testcase (fixes #116) 2018-02-13 23:48:00 +01:00
Evan Rutledge Borden 019d47bf7e Change infix patterns to include spaces
This commit changes infix patterns to utilize `lrdrNameToTextAnn`. This
function allows the logic to avoid introspecting on the constructor
name.

Additionally this adds spaces to all infix operator pattern matches.
Previously infix symbols did not include spaces:

```
foo (x:xs) = _
```

Now they include a space

```
foo (x : xs) = _
```
2018-02-09 16:43:44 +01:00
Lennart Spitzner 43abab2dd2 Remove space after opening parenthesis (fixes #87) 2017-12-28 20:46:03 +01:00
Lennart Spitzner 39c48b33f1 Fix error in Annotation filtering (fixes #70) 2017-12-08 19:57:16 +01:00
Lennart Spitzner 127299b442 Merge branch 'dev' into indentpolicyleft 2017-11-30 23:47:18 +01:00
Lennart Spitzner 8a401d291e Workaround for #68: trim exactprinted text for unknown nodes 2017-11-28 18:23:05 +01:00
Lennart Spitzner 6a97379b33 Add whitespace around operator in section, Fixes #67 2017-11-28 17:56:28 +01:00
Evan Rutledge Borden ba3d9ad739 Add tests for record construction. 2017-11-27 18:12:19 +01: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