Fix interaction of do-block with ExprWithTySig
parent
628ab81bc9
commit
9d14407191
|
@ -1101,3 +1101,10 @@ func = do
|
|||
}
|
||||
)
|
||||
anotherArgument
|
||||
|
||||
#test yet another invalid do-block operator alignment
|
||||
func = do
|
||||
it "some long description does not matter" $ do
|
||||
some long function invocation (plus a paren + ed operator expression)
|
||||
`shouldReturn` all ((==) True)
|
||||
:: IO ()
|
||||
|
|
|
@ -850,7 +850,11 @@ layoutExpr lexpr@(L _ expr) = do
|
|||
ExprWithTySig _ exp1 (HsWC _ typ1) -> do
|
||||
expDoc <- shareDoc $ callLayouter layout_expr exp1
|
||||
typDoc <- shareDoc $ callLayouter layout_sigType typ1
|
||||
docSeq [appSep expDoc, appSep $ docLit $ Text.pack "::", typDoc]
|
||||
docAlt
|
||||
[ docForceSingleline
|
||||
$ docSeq [appSep expDoc, appSep $ docLitS "::", typDoc]
|
||||
, docPar expDoc (docSeq [docLitS "::", docSeparator, typDoc])
|
||||
]
|
||||
ArithSeq _ Nothing info -> case info of
|
||||
From e1 -> do
|
||||
e1Doc <- shareDoc $ layoutExpr e1
|
||||
|
|
Loading…
Reference in New Issue