mirror of
https://github.com/google/ormolu.git
synced 2024-11-27 13:13:23 +03:00
Hang after block arguments
This commit is contained in:
parent
682a5f4672
commit
118558738b
@ -0,0 +1,24 @@
|
||||
f1 = foo do bar
|
||||
|
||||
f2 =
|
||||
foo do
|
||||
bar
|
||||
|
||||
f3 =
|
||||
foo case True of
|
||||
True -> bar
|
||||
False -> baz
|
||||
|
||||
f4 = foo let a = 3 in b
|
||||
|
||||
f5 =
|
||||
foo
|
||||
let a = 3
|
||||
b = a
|
||||
in b
|
||||
|
||||
f6 =
|
||||
foo
|
||||
if bar
|
||||
then baz
|
||||
else not baz
|
18
data/examples/declaration/value/function/block-arguments.hs
Normal file
18
data/examples/declaration/value/function/block-arguments.hs
Normal file
@ -0,0 +1,18 @@
|
||||
f1 = foo do bar
|
||||
|
||||
f2 = foo do
|
||||
bar
|
||||
|
||||
f3 = foo case True of
|
||||
True -> bar
|
||||
False -> baz
|
||||
|
||||
f4 = foo let a = 3 in b
|
||||
|
||||
f5 = foo let a = 3
|
||||
b = a
|
||||
in b
|
||||
|
||||
f6 = foo if bar
|
||||
then baz
|
||||
else not baz
|
@ -470,8 +470,9 @@ p_hsExpr = \case
|
||||
inci (p_matchGroup LambdaCase mgroup)
|
||||
HsApp NoExt f x -> sitcc $ do
|
||||
located f p_hsExpr
|
||||
breakpoint
|
||||
inci (located x p_hsExpr)
|
||||
-- Second argument can be a `do` or `case` block with `-XBlockArguments`.
|
||||
placeHanging (exprPlacement (unLoc x)) $
|
||||
located x p_hsExpr
|
||||
HsAppType a e -> do
|
||||
located e p_hsExpr
|
||||
breakpoint
|
||||
|
Loading…
Reference in New Issue
Block a user