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