Fix empty do-block error call
parent
043b554a89
commit
f985c6df69
|
@ -1072,3 +1072,12 @@ data ReformatParenMode
|
||||||
= ReformatParenModeKeep -- don't modify parens at all
|
= ReformatParenModeKeep -- don't modify parens at all
|
||||||
| ReformatParenModeClean -- remove unnecessary parens
|
| ReformatParenModeClean -- remove unnecessary parens
|
||||||
| ReformatParenModeAll -- add superfluous parens everywhere
|
| ReformatParenModeAll -- add superfluous parens everywhere
|
||||||
|
|
||||||
|
#test empty do block error
|
||||||
|
func = process $ do
|
||||||
|
it "some long description to fill this line" $ do
|
||||||
|
( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
+ bbbbbbbbbbbbbbbbbb
|
||||||
|
+ cccccccccccccccccccccccccccccccccccccccccccccccccc
|
||||||
|
)
|
||||||
|
`shouldReturn` thing
|
||||||
|
|
|
@ -613,6 +613,17 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
, expDoc1
|
, expDoc1
|
||||||
]
|
]
|
||||||
-- docSeq [appSep $ docLit "let in", expDoc1]
|
-- docSeq [appSep $ docLit "let in", expDoc1]
|
||||||
|
HsDo epAnn stmtCtx (L (SrcSpanAnn stmtEpAnn _) []) ->
|
||||||
|
case stmtCtx of
|
||||||
|
DoExpr _ ->
|
||||||
|
docHandleComms epAnn $ docHandleComms stmtEpAnn $ docLitS "do"
|
||||||
|
MDoExpr _ ->
|
||||||
|
docHandleComms epAnn $ docHandleComms stmtEpAnn $ docLitS "mdo"
|
||||||
|
ListComp ->
|
||||||
|
error "brittany internal error: ListCompo with null statements"
|
||||||
|
MonadComp ->
|
||||||
|
error "brittany internal error: ListCompo with null statements"
|
||||||
|
_ -> unknownNodeError "HsDo{} unknown stmtCtx" lexpr
|
||||||
HsDo epAnn stmtCtx (L (SrcSpanAnn stmtEpAnn _) stmts) ->
|
HsDo epAnn stmtCtx (L (SrcSpanAnn stmtEpAnn _) stmts) ->
|
||||||
docHandleComms epAnn $ do
|
docHandleComms epAnn $ do
|
||||||
case stmtCtx of
|
case stmtCtx of
|
||||||
|
|
Loading…
Reference in New Issue