Describe the bug
Ormolu outputs a parsing failure when formatting a multi-line list comprehension inside a do block.
To Reproduce
Format the following code:
a :: B
a = do
[ c
| c <- d ]
Expected behavior
Formatting is successful.
Actual behavior
Parsing of formatted code failed:
<input>:4:3
parse error (possibly incorrect indentation or mismatched brackets)
Environment
Ormolu Live, Version 0.5.0.0, commit 25b04d4, using ghc-lib-parser 9.2.1.20220109
Additional context
- Where the line break inside the comprehension occurs seems to make no difference.
- The problem occurs only inside do-blocks
Describe the bug
Ormolu outputs a parsing failure when formatting a multi-line list comprehension inside a
doblock.To Reproduce
Format the following code:
Expected behavior
Formatting is successful.
Actual behavior
Environment
Ormolu Live, Version 0.5.0.0, commit 25b04d4, using ghc-lib-parser 9.2.1.20220109
Additional context