From 399e2f4f43a4fad1ddf68da6f065d0d16ea08991 Mon Sep 17 00:00:00 2001 From: Lennart Spitzner Date: Sat, 13 Jan 2018 18:41:51 +0100 Subject: [PATCH] Minor cleanups --- src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs b/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs index fcf69b4..8d90148 100644 --- a/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs +++ b/src/Language/Haskell/Brittany/Internal/Layouters/Expr.hs @@ -532,6 +532,7 @@ layoutExpr lexpr@(L _ expr) = do expDoc1 <- docSharedWrapper layoutExpr exp1 mBindDocs <- layoutLocalBinds binds let + ifIndentLeftElse :: a -> a -> a ifIndentLeftElse x y = if indentPolicy == IndentPolicyLeft then x else y -- this `docSetIndentLevel` might seem out of place, but is here due to @@ -557,17 +558,17 @@ layoutExpr lexpr@(L _ expr) = do ] , docAddBaseY BrIndentRegular $ docPar - (appSep $ docLit $ Text.pack "let") + (docLit $ Text.pack "let") (docSetBaseAndIndent $ return bindDoc) ] , docAlt [ docSeq - [ ifIndentLeftElse id appSep $ docLit $ Text.pack "in " + [ appSep $ docLit $ Text.pack $ ifIndentLeftElse "in" "in " , ifIndentLeftElse docForceSingleline docSetBaseAndIndent expDoc1 ] , docAddBaseY BrIndentRegular $ docPar - (appSep $ docLit $ Text.pack "in") + (docLit $ Text.pack "in") (docSetBaseY $ expDoc1) ] ]