Minor cleanups
parent
cab1297585
commit
399e2f4f43
|
@ -532,6 +532,7 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
expDoc1 <- docSharedWrapper layoutExpr exp1
|
expDoc1 <- docSharedWrapper layoutExpr exp1
|
||||||
mBindDocs <- layoutLocalBinds binds
|
mBindDocs <- layoutLocalBinds binds
|
||||||
let
|
let
|
||||||
|
ifIndentLeftElse :: a -> a -> a
|
||||||
ifIndentLeftElse x y =
|
ifIndentLeftElse x y =
|
||||||
if indentPolicy == IndentPolicyLeft then x else y
|
if indentPolicy == IndentPolicyLeft then x else y
|
||||||
-- this `docSetIndentLevel` might seem out of place, but is here due to
|
-- this `docSetIndentLevel` might seem out of place, but is here due to
|
||||||
|
@ -557,17 +558,17 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
]
|
]
|
||||||
, docAddBaseY BrIndentRegular
|
, docAddBaseY BrIndentRegular
|
||||||
$ docPar
|
$ docPar
|
||||||
(appSep $ docLit $ Text.pack "let")
|
(docLit $ Text.pack "let")
|
||||||
(docSetBaseAndIndent $ return bindDoc)
|
(docSetBaseAndIndent $ return bindDoc)
|
||||||
]
|
]
|
||||||
, docAlt
|
, docAlt
|
||||||
[ docSeq
|
[ docSeq
|
||||||
[ ifIndentLeftElse id appSep $ docLit $ Text.pack "in "
|
[ appSep $ docLit $ Text.pack $ ifIndentLeftElse "in" "in "
|
||||||
, ifIndentLeftElse docForceSingleline docSetBaseAndIndent expDoc1
|
, ifIndentLeftElse docForceSingleline docSetBaseAndIndent expDoc1
|
||||||
]
|
]
|
||||||
, docAddBaseY BrIndentRegular
|
, docAddBaseY BrIndentRegular
|
||||||
$ docPar
|
$ docPar
|
||||||
(appSep $ docLit $ Text.pack "in")
|
(docLit $ Text.pack "in")
|
||||||
(docSetBaseY $ expDoc1)
|
(docSetBaseY $ expDoc1)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue