diff --git a/.hlint.yaml b/.hlint.yaml index 361296740..48f50c20a 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -40,7 +40,6 @@ - ignore: {name: "Use fewer imports"} - ignore: {name: "Use mapMaybe"} - ignore: {name: "Use intercalate"} -- ignore: {name: "Use guards"} - ignore: {name: "Use tuple-section"} - ignore: {name: "Use section"} - ignore: {name: "Use maybe"} diff --git a/hledger/Hledger/Cli/Commands/Balance.hs b/hledger/Hledger/Cli/Commands/Balance.hs index 120473c9c..68dd3fe12 100644 --- a/hledger/Hledger/Cli/Commands/Balance.hs +++ b/hledger/Hledger/Cli/Commands/Balance.hs @@ -499,8 +499,10 @@ renderComponent topaligned oneline opts (acctname, depth, total) (FormatField lj TotalField -> Cell align . pure $ showMixedAmountB dopts total _ -> Cell align [mempty] where - align = if topaligned then (if ljust then TopLeft else TopRight) - else (if ljust then BottomLeft else BottomRight) + align | topaligned && ljust = TopLeft + | topaligned = TopRight + | ljust = BottomLeft + | otherwise = BottomRight dopts = (balanceOpts True opts){displayOneLine=oneline, displayMinWidth=mmin, displayMaxWidth=mmax} -- rendering multi-column balance reports