Skip to content

Commit

Permalink
Propagate BracketStyle in arrow application
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Nov 25, 2024
1 parent bb9e7b1 commit 5e550f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ foo1 x = proc (y, z) -> do
(bindA -< y)
|)
z

foo2 = proc () -> do
( proc () ->
returnA -< ()
)
-<
()
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ foo1 x = proc (y, z) -> do
bar
(bindA -< y)
|) z

foo2 = proc () -> do
(proc () ->
returnA -< ()
) -< ()
2 changes: 1 addition & 1 deletion src/Ormolu/Printer/Meat/Declaration/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ p_hsCmd' :: IsApplicand -> BracketStyle -> HsCmd GhcPs -> R ()
p_hsCmd' isApp s = \case
HsCmdArrApp _ body input arrType rightToLeft -> do
let (l, r) = if rightToLeft then (body, input) else (input, body)
located l p_hsExpr
located l $ p_hsExpr' NotApplicand s
breakpoint
inci $ do
case (arrType, rightToLeft) of
Expand Down

0 comments on commit 5e550f9

Please sign in to comment.