1
1
mirror of https://github.com/tweag/ormolu.git synced 2024-09-17 16:17:14 +03:00

Indent closing bracket for list comprehensions in do blocks

This commit is contained in:
Alexander Esgen 2022-06-09 21:03:56 +02:00 committed by Mark Karpov
parent 25b04d45b4
commit 7fc42d1929
4 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,9 @@
* Fixed a bug in the diff printing functionality. [Issue
886](https://github.com/tweag/ormolu/issues/886).
* Indent closing bracket for list comprehensions in `do` blocks.
[Issue 893](https://github.com/tweag/ormolu/issues/893).
## Ormolu 0.5.0.0
* Changed the way operator fixities and precedences are inferred.

View File

@ -22,3 +22,8 @@ barbaz x y z w =
d
]
]
a = do
[ c
| c <- d
]

View File

@ -20,3 +20,7 @@ barbaz x y z w = [
c, d
]
]
a = do
[ c
| c <- d ]

View File

@ -744,7 +744,7 @@ p_hsExpr' s = \case
forM_ moduleName $ \m -> atom m *> txt "."
txt header
p_stmts exprPlacement (p_hsExpr' S) es
compBody = brackets N . located es $ \xs -> do
compBody = brackets s . located es $ \xs -> do
let p_parBody =
sep
(breakpoint >> txt "|" >> space)