diff --git a/source/library/Language/Haskell/Brittany/Internal/ToBriDoc/OpTree.hs b/source/library/Language/Haskell/Brittany/Internal/ToBriDoc/OpTree.hs index 0d2b994..5f37e48 100644 --- a/source/library/Language/Haskell/Brittany/Internal/ToBriDoc/OpTree.hs +++ b/source/library/Language/Haskell/Brittany/Internal/ToBriDoc/OpTree.hs @@ -297,7 +297,7 @@ layoutOpTree allowSinglelinePar = \case $ docForceZeroAdd $ wrapParenMl (docSetBaseY docL) - (sharedOpsFlat <&> \(od, ed) -> + (sharedOps <&> \(od, ed) -> docCols ColOpPrefix [appSep od, docSetBaseY ed] ) -- > one @@ -308,6 +308,6 @@ layoutOpTree allowSinglelinePar = \case hasParen -- ((if not hasParen then docAddBaseY BrIndentRegular else id) docL) (if hasParen then docSetBaseY docL else docL) - (sharedOpsFlat <&> \(od, ed) -> + ((if hasParen then sharedOps else sharedOpsFlat) <&> \(od, ed) -> docCols ColOpPrefix [appSep od, docSetBaseY ed] )