Fix comment-after-context
parent
b24379d104
commit
09ec59eaf9
|
@ -929,3 +929,10 @@ alignColsLines layoutBriDocM bridocs = do -- colInfos `forM_` \colInfo -> do
|
|||
-- contains nonempty Seqs.
|
||||
colAggregation xs = maximum [ x | x <- xs, x <= minimum xs + alignMax' ]
|
||||
where alignMax' = max 0 alignMax
|
||||
|
||||
#test type-signature comment-after-context
|
||||
tzejubuVxairoy
|
||||
:: (VwzuyApikd.VwzuyApikd zub, ZxtbaKospaKwqnuw Defg.Xeqpgko.Xeqpgko m)
|
||||
-- foo bar
|
||||
=> CUR.Ozuzcak zub
|
||||
-> m ()
|
||||
|
|
|
@ -37,12 +37,18 @@ splitArrowType ltype@(L _ typ) = case typ of
|
|||
splitHsForallTypeFromBinders (getBinders hsf) typ1
|
||||
HsQualTy NoExtField ctxMay typ1 -> do
|
||||
(innerHead, innerBody) <- splitArrowType typ1
|
||||
(wrapCtx, cntxtDocs) <- case ctxMay of
|
||||
Nothing -> pure (id, [])
|
||||
Just (L (SrcSpanAnn epAnn _) ctxs) -> do
|
||||
let wrap = case epAnn of
|
||||
EpAnn _ (AnnContext (Just (_, loc)) _ _) _ ->
|
||||
docFlushCommsPost False (Just $ epaLocationRealSrcSpanStart loc)
|
||||
. docHandleComms epAnn
|
||||
_ -> docHandleComms epAnn
|
||||
x <- ctxs `forM` (shareDoc . layoutType)
|
||||
pure (wrap, x)
|
||||
pure
|
||||
$ ( do
|
||||
cntxtDocs <- case ctxMay of
|
||||
Nothing -> pure []
|
||||
Just (L _ ctxs) -> ctxs `forM` (shareDoc . layoutType)
|
||||
case cntxtDocs of
|
||||
$ ( wrapCtx $ case cntxtDocs of
|
||||
[] -> docLit $ Text.pack "()"
|
||||
[x] -> x
|
||||
docs -> docAlt
|
||||
|
|
Loading…
Reference in New Issue