diff --git a/data/examples/declaration/value/function/multi-way-if-out.hs b/data/examples/declaration/value/function/multi-way-if-out.hs index 8047912..0d14253 100644 --- a/data/examples/declaration/value/function/multi-way-if-out.hs +++ b/data/examples/declaration/value/function/multi-way-if-out.hs @@ -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 diff --git a/src/Ormolu/Printer/Meat/Declaration/Value.hs b/src/Ormolu/Printer/Meat/Declaration/Value.hs index 5ba5914..70745ba 100644 --- a/src/Ormolu/Printer/Meat/Declaration/Value.hs +++ b/src/Ormolu/Printer/Meat/Declaration/Value.hs @@ -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)