From cab12975851076e568c839471ce46830a3948dfc Mon Sep 17 00:00:00 2001 From: Evan Rutledge Borden Date: Sun, 31 Dec 2017 00:11:10 -0500 Subject: [PATCH] Change function name to if/else --- src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs b/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs index 6e6929f..fcf69b4 100644 --- a/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs +++ b/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs @@ -532,7 +532,7 @@ layoutExpr lexpr@(L _ expr) = do expDoc1 <- docSharedWrapper layoutExpr exp1 mBindDocs <- layoutLocalBinds binds let - whenIndentLeftOr x y = + ifIndentLeftElse x y = if indentPolicy == IndentPolicyLeft then x else y -- this `docSetIndentLevel` might seem out of place, but is here due to -- ghc-exactprint's DP handling of "let" in particular. @@ -552,7 +552,7 @@ layoutExpr lexpr@(L _ expr) = do [ docAlt [ docSeq [ appSep $ docLit $ Text.pack "let" - , whenIndentLeftOr docForceSingleline docSetBaseAndIndent + , ifIndentLeftElse docForceSingleline docSetBaseAndIndent $ return bindDoc ] , docAddBaseY BrIndentRegular @@ -562,8 +562,8 @@ layoutExpr lexpr@(L _ expr) = do ] , docAlt [ docSeq - [ whenIndentLeftOr id appSep $ docLit $ Text.pack "in " - , whenIndentLeftOr docForceSingleline docSetBaseAndIndent expDoc1 + [ ifIndentLeftElse id appSep $ docLit $ Text.pack "in " + , ifIndentLeftElse docForceSingleline docSetBaseAndIndent expDoc1 ] , docAddBaseY BrIndentRegular $ docPar