Fix a missing comment case with MultiWayIf
parent
03e578f72c
commit
4ed3a2f53d
|
@ -14,3 +14,10 @@ func = do
|
||||||
bar $ if
|
bar $ if
|
||||||
| cond1 -> loooooooooooooooooooooooooooooong expr1
|
| cond1 -> loooooooooooooooooooooooooooooong expr1
|
||||||
| cond2 -> loooooooooooooooooooooooooooooong expr2
|
| cond2 -> loooooooooooooooooooooooooooooong expr2
|
||||||
|
|
||||||
|
#test multiwayif comment between cases
|
||||||
|
func = do
|
||||||
|
if
|
||||||
|
| abc -> yes
|
||||||
|
-- | test comment
|
||||||
|
| _ -> no
|
||||||
|
|
|
@ -493,7 +493,10 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
|| any (\(L _ (GRHS gEpAnn _ _)) -> hasAnyCommentsBelow gEpAnn) cases
|
|| any (\(L _ (GRHS gEpAnn _ _)) -> hasAnyCommentsBelow gEpAnn) cases
|
||||||
let posIf = obtainAnnPos epAnn AnnIf
|
let posIf = obtainAnnPos epAnn AnnIf
|
||||||
layouters <- mAsk
|
layouters <- mAsk
|
||||||
docSetParSpacing $ docAddBaseY BrIndentRegular $ docPar
|
docHandleComms epAnn
|
||||||
|
$ docSetParSpacing
|
||||||
|
$ docAddBaseY BrIndentRegular
|
||||||
|
$ docPar
|
||||||
(docHandleComms posIf $ docLit $ Text.pack "if")
|
(docHandleComms posIf $ docLit $ Text.pack "if")
|
||||||
(layout_patternBindFinal layouters
|
(layout_patternBindFinal layouters
|
||||||
Nothing
|
Nothing
|
||||||
|
|
Loading…
Reference in New Issue