Fix failing testcase on bidirectional pattern synonyms
parent
b546b514b0
commit
eec946830b
|
@ -753,16 +753,16 @@ layoutPatSynBind name patSynDetails patDir rpat = do
|
||||||
-- ..
|
-- ..
|
||||||
-- ..
|
-- ..
|
||||||
docAddBaseY BrIndentRegular $ docSeq $
|
docAddBaseY BrIndentRegular $ docSeq $
|
||||||
[ patDoc
|
[ patDoc
|
||||||
, docSeparator
|
, docSeparator
|
||||||
, layoutLPatSyn name patSynDetails
|
, layoutLPatSyn name patSynDetails
|
||||||
, docSeparator
|
, docSeparator
|
||||||
, binderDoc
|
, binderDoc
|
||||||
, docSeparator
|
, docSeparator
|
||||||
, body
|
, body
|
||||||
] ++ case mWhereDocs of
|
] ++ case mWhereDocs of
|
||||||
Just ds -> [docSeparator, docPar whereDoc (docSeq ds)]
|
Just ds -> [docSeparator, docPar whereDoc (docLines ds)]
|
||||||
Nothing -> []
|
Nothing -> []
|
||||||
|
|
||||||
addAlternative $
|
addAlternative $
|
||||||
-- pattern .. =
|
-- pattern .. =
|
||||||
|
@ -774,12 +774,10 @@ layoutPatSynBind name patSynDetails patDir rpat = do
|
||||||
docAddBaseY BrIndentRegular $ docPar
|
docAddBaseY BrIndentRegular $ docPar
|
||||||
(docSeq $ appSep <$> [ patDoc, layoutLPatSyn name patSynDetails, binderDoc])
|
(docSeq $ appSep <$> [ patDoc, layoutLPatSyn name patSynDetails, binderDoc])
|
||||||
(docLines $
|
(docLines $
|
||||||
[ docSeq $ body : case mWhereDocs of
|
case mWhereDocs of
|
||||||
Just _ -> [docSeparator, whereDoc]
|
Nothing -> [body]
|
||||||
Nothing -> []
|
Just ds ->
|
||||||
] <> case mWhereDocs of
|
[ docSeq [body, docSeparator, whereDoc] ] ++ ds
|
||||||
Just x -> [docSeq x]
|
|
||||||
Nothing -> []
|
|
||||||
)
|
)
|
||||||
|
|
||||||
-- | Helper method for the left hand side of a pattern synonym
|
-- | Helper method for the left hand side of a pattern synonym
|
||||||
|
|
Loading…
Reference in New Issue