Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonchinn178 committed Jun 6, 2024
1 parent 6927f67 commit c04cd9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ a = do

trans =
[ x
| x <- xs,
then
reverse,
then
reverse
| x <- xs,
then
reverse,
then
reverse
]
3 changes: 2 additions & 1 deletion src/Ormolu/Printer/Meat/Declaration/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ p_listComp s es = sitcc (vlayout singleLine multiLine)
body = located es p_body
p_body xs = do
let (stmts, yield) =
-- TODO: use unsnoc when require GHC 9.8+
case xs of
[] -> error $ "list comprehension unexpectedly had no expressions"
_ -> (init xs, last xs)
Expand Down Expand Up @@ -948,7 +949,7 @@ gatherStmts = \case
-- will be ParStmt.
[L _ (ParStmt _ blocks _ _)] ->
[ concatMap collectNonParStmts stmts
| ParStmtBlock _ stmts _ _ <- blocks
| ParStmtBlock _ stmts _ _ <- blocks
]
-- Otherwise, list will not contain any ParStmt
stmts ->
Expand Down

0 comments on commit c04cd9d

Please sign in to comment.