Set proper indentation base level for operands

ghc92
Lennart Spitzner 2023-06-20 12:02:47 +02:00
parent a6e187e962
commit 628ab81bc9
2 changed files with 17 additions and 6 deletions

View File

@ -1084,9 +1084,20 @@ func = do
-- but that's a type error.
let jebnaZiegui = UtatUcaOrgmqf
$ eqazak
(NO.kaeyuo . NO.FUGOKovsxq)
(maybe (NO.kaeyuo NO.UvmsoItqOguTOLqtuld)
(NO.kaeyuo . NO.XvswJUBeroci)
)
nogcVassuVvbFiew
(NO.kaeyuo . NO.FUGOKovsxq)
(maybe (NO.kaeyuo NO.UvmsoItqOguTOLqtuld)
(NO.kaeyuo . NO.XvswJUBeroci)
)
nogcVassuVvbFiew
kyxson = vzahxEooRecOriqdp apneZejuzTfuQkuJosqoa
#test base level for operands
func = do
pure
$!! otherFunc
(SomeLargeRecord { aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1
, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = 2
, cccccccccccccccccccccccccccccccccc = 3
}
)
anotherArgument

View File

@ -425,7 +425,7 @@ layoutOpTree allowSinglelinePar = \case
let singlelineUnlessFree = case indentPolicy of
IndentPolicyLeft -> docForceSingleline
IndentPolicyMultiple -> docForceSingleline
IndentPolicyFree -> id
IndentPolicyFree -> docSetBaseY
let curIsPrec0 = case fixity of
Nothing -> False
Just (Fixity _ prec _) -> prec == 0