Use docAltFilter for consistency.

pull/66/head
Evan Rutledge Borden 2017-11-25 20:34:07 -05:00 committed by Lennart Spitzner
parent 35f33c131c
commit de0851f975
1 changed files with 13 additions and 11 deletions

View File

@ -64,17 +64,19 @@ layoutStmt lstmt@(L _ stmt) = do
(docLit $ Text.pack "let")
(docSetBaseAndIndent $ return bindDoc)
]
Just bindDocs ->
let letSeq = docSeq
Just bindDocs -> docAltFilter
[ ( indentPolicy /= IndentPolicyLeft
, docSeq
[ appSep $ docLit $ Text.pack "let"
, docSetBaseAndIndent $ docLines $ return <$> bindDocs
]
letRegular = docAddBaseY BrIndentRegular $ docPar
)
, ( True
, docAddBaseY BrIndentRegular $ docPar
(docLit $ Text.pack "let")
(docSetBaseAndIndent $ docLines $ return <$> bindDocs)
in case indentPolicy of
IndentPolicyLeft -> docAlt [letRegular]
_ -> docAlt [letSeq, letRegular]
)
]
RecStmt stmts _ _ _ _ _ _ _ _ _ -> do
docSeq
[ docLit (Text.pack "rec")