Change multiway if layout to keep consistent 2-space indent increase

This commit is contained in:
Yuriy Syrovetskiy 2019-08-16 11:21:58 +03:00 committed by Mark Karpov
parent d0a44c23cb
commit ee3c506889
2 changed files with 8 additions and 6 deletions

View File

@ -3,7 +3,8 @@
foo x = if | x == 5 -> 5
bar x y =
if | x > y -> x
| x < y ->
y
| otherwise -> x
if
| x > y -> x
| x < y ->
y
| otherwise -> x

View File

@ -549,8 +549,9 @@ p_hsExpr = \case
breakpoint
inci (p_hsExpr x)
HsMultiIf NoExt guards -> do
txt "if "
sitcc $ sep newline (located' (p_grhs RightArrow)) guards
txt "if"
breakpoint
inci . sitcc $ sep newline (located' (p_grhs RightArrow)) guards
HsLet NoExt localBinds e -> do
txt "let "
sitcc (located localBinds p_hsLocalBinds)