Add some comments/examples in layoutStmt

pull/66/head
Lennart Spitzner 2017-11-27 23:05:47 +01:00
parent 9e8571b848
commit 466ff237ff
1 changed files with 14 additions and 4 deletions

View File

@ -55,27 +55,37 @@ layoutStmt lstmt@(L _ stmt) = do
-- heh.
Just [] -> docLit $ Text.pack "let" -- this probably never happens
Just [bindDoc] -> docAltFilter
[ ( indentPolicy /= IndentPolicyLeft
[ -- let bind = expr
( indentPolicy /= IndentPolicyLeft
, docCols
ColDoLet
[ appSep $ docLit $ Text.pack "let"
, docSetBaseAndIndent $ return bindDoc
]
)
, ( True
, -- let
-- bind = expr
( True
, docAddBaseY BrIndentRegular $ docPar
(docLit $ Text.pack "let")
(docSetBaseAndIndent $ return bindDoc)
)
]
Just bindDocs -> docAltFilter
[ ( indentPolicy /= IndentPolicyLeft
[ -- let aaa = expra
-- bbb = exprb
-- ccc = exprc
( indentPolicy /= IndentPolicyLeft
, docSeq
[ appSep $ docLit $ Text.pack "let"
, docSetBaseAndIndent $ docLines $ return <$> bindDocs
]
)
, ( True
, -- let
-- aaa = expra
-- bbb = exprb
-- ccc = exprc
( True
, docAddBaseY BrIndentRegular $ docPar
(docLit $ Text.pack "let")
(docSetBaseAndIndent $ docLines $ return <$> bindDocs)