1
1
mirror of https://github.com/google/ormolu.git synced 2025-01-06 06:33:37 +03:00
Commit Graph

15 Commits

Author SHA1 Message Date
Mitchell Rosen
4b1d31e4ea Implement rendering of ‘SigPat’s 2019-06-10 21:24:00 +02:00
waddlaw
59bc871d1a Implement view patterns 2019-06-08 20:31:08 +02:00
mrkkrp
fda95194f6 Fix rendering of hanging constructions 2019-06-08 19:29:23 +02:00
mrkkrp
46d175c89d Make case expressions hanging 2019-06-06 22:35:53 +02:00
mrkkrp
f937aa7aaf Handle “prefixed blocks” when they go after an operator
The change is obvious from the examples.
2019-06-06 22:35:53 +02:00
Utku Demir
99a345b919 Initial support for do notation 2019-06-06 20:50:52 +02:00
mrkkrp
6bc7333a6d Fix rendering of certain record patterns 2019-06-05 21:17:22 +02:00
mrkkrp
1b287b3b0d Change formatting of operators and infix constructors
This formatting scheme is more appropriate if you think of chaining multiple
infix expressions and combining it with do-blocks. The operator should hang
on previous line instead going first on the next line, e.g.:

foo +
  bar

instead of

foo
  + bar
2019-06-05 20:36:04 +02:00
mrkkrp
777524b6de Various adjustments
The main point of this commit is perhaps that certain constructions are rare
and unnatural in multi-line form, so we could print them always in
single-line form however putting parentheses still in multi-line fashion so
the properly of idempotency is satisfied.
2019-06-04 22:45:16 +02:00
yumiova
45e25a1146 Implement rendering of most types of expressions
This pull request implements most of currently missing types of expressions,
with the exception of:

* Do notation
* List comprehensions (list comprehensions are considered a kind of do
  notation in GHC)
* Arrow notation
* Template Haskell

Most expressions are pretty printed in an uncontroversial manner, preferably
similar to existing syntax.
2019-06-04 22:45:16 +02:00
mrkkrp
9a0276b36d Implement the rest of binding types
This includes pattern binds, pattern synonyms, and a refactoring around
printing ‘RdrName’s.
2019-06-04 00:49:33 +02:00
Utku Demir
06e4f1d5ad Implement TypeApplications and StaticPointers support 2019-05-28 12:18:32 +02:00
mrkkrp
b129979516 Fix guards 2019-05-23 15:30:55 +02:00
mrkkrp
61f49600f8 Adjust if formatting
This includes a refactoring which changes the default strategy for
indentation level bumping. I think it's an improvement overall.
2019-05-23 15:30:55 +02:00
mrkkrp
09afebbd9c Implement rendering of simplest value-level constructs 2019-05-18 18:47:53 +02:00