Fix failing testcase on bidirectional pattern synonyms

pull/287/head
Lennart Spitzner 2020-03-21 21:58:47 +01:00
parent b546b514b0
commit eec946830b
1 changed files with 14 additions and 16 deletions

View File

@ -761,7 +761,7 @@ layoutPatSynBind name patSynDetails patDir rpat = do
, docSeparator
, body
] ++ case mWhereDocs of
Just ds -> [docSeparator, docPar whereDoc (docSeq ds)]
Just ds -> [docSeparator, docPar whereDoc (docLines ds)]
Nothing -> []
addAlternative $
@ -774,12 +774,10 @@ layoutPatSynBind name patSynDetails patDir rpat = do
docAddBaseY BrIndentRegular $ docPar
(docSeq $ appSep <$> [ patDoc, layoutLPatSyn name patSynDetails, binderDoc])
(docLines $
[ docSeq $ body : case mWhereDocs of
Just _ -> [docSeparator, whereDoc]
Nothing -> []
] <> case mWhereDocs of
Just x -> [docSeq x]
Nothing -> []
case mWhereDocs of
Nothing -> [body]
Just ds ->
[ docSeq [body, docSeparator, whereDoc] ] ++ ds
)
-- | Helper method for the left hand side of a pattern synonym