Dont flatten operators without surrounding parens

ghc92
Lennart Spitzner 2023-04-19 12:02:07 +00:00
parent 09ec59eaf9
commit 5563cd4d93
1 changed files with 2 additions and 2 deletions

View File

@ -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]
)