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") (docLit $ Text.pack "let")
(docSetBaseAndIndent $ return bindDoc) (docSetBaseAndIndent $ return bindDoc)
] ]
Just bindDocs -> Just bindDocs -> docAltFilter
let letSeq = docSeq [ ( indentPolicy /= IndentPolicyLeft
, docSeq
[ appSep $ docLit $ Text.pack "let" [ appSep $ docLit $ Text.pack "let"
, docSetBaseAndIndent $ docLines $ return <$> bindDocs , docSetBaseAndIndent $ docLines $ return <$> bindDocs
] ]
letRegular = docAddBaseY BrIndentRegular $ docPar )
, ( True
, docAddBaseY BrIndentRegular $ docPar
(docLit $ Text.pack "let") (docLit $ Text.pack "let")
(docSetBaseAndIndent $ docLines $ return <$> bindDocs) (docSetBaseAndIndent $ docLines $ return <$> bindDocs)
in case indentPolicy of )
IndentPolicyLeft -> docAlt [letRegular] ]
_ -> docAlt [letSeq, letRegular]
RecStmt stmts _ _ _ _ _ _ _ _ _ -> do RecStmt stmts _ _ _ _ _ _ _ _ _ -> do
docSeq docSeq
[ docLit (Text.pack "rec") [ docLit (Text.pack "rec")