RecursiveDo: Add second layout, Respect IndentPolicyLeft
parent
466ff237ff
commit
d9155e240d
|
@ -91,12 +91,27 @@ layoutStmt lstmt@(L _ stmt) = do
|
||||||
(docSetBaseAndIndent $ docLines $ return <$> bindDocs)
|
(docSetBaseAndIndent $ docLines $ return <$> bindDocs)
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
RecStmt stmts _ _ _ _ _ _ _ _ _ -> do
|
RecStmt stmts _ _ _ _ _ _ _ _ _ -> docAltFilter
|
||||||
docSeq
|
[ -- rec stmt1
|
||||||
[ docLit (Text.pack "rec")
|
-- stmt2
|
||||||
, docSeparator
|
-- stmt3
|
||||||
, docSetBaseAndIndent $ docLines $ layoutStmt <$> stmts
|
( indentPolicy /= IndentPolicyLeft
|
||||||
]
|
, docSeq
|
||||||
|
[ docLit (Text.pack "rec")
|
||||||
|
, docSeparator
|
||||||
|
, docSetBaseAndIndent $ docLines $ layoutStmt <$> stmts
|
||||||
|
]
|
||||||
|
)
|
||||||
|
, -- rec
|
||||||
|
-- stmt1
|
||||||
|
-- stmt2
|
||||||
|
-- stmt3
|
||||||
|
( True
|
||||||
|
, docAddBaseY BrIndentRegular $ docPar
|
||||||
|
(docLit (Text.pack "rec"))
|
||||||
|
(docLines $ layoutStmt <$> stmts)
|
||||||
|
)
|
||||||
|
]
|
||||||
BodyStmt expr _ _ _ -> do
|
BodyStmt expr _ _ _ -> do
|
||||||
expDoc <- docSharedWrapper layoutExpr expr
|
expDoc <- docSharedWrapper layoutExpr expr
|
||||||
docAddBaseY BrIndentRegular $ expDoc
|
docAddBaseY BrIndentRegular $ expDoc
|
||||||
|
|
Loading…
Reference in New Issue