From fa58dc11f4b96f009e40db9bee40dfbdb208cece Mon Sep 17 00:00:00 2001 From: Henning Thielemann Date: Tue, 15 Oct 2024 20:58:39 +0200 Subject: [PATCH] cli: Commands.Balance: remove lambda on ropts1 for balanceReport* This is consistent with the calls to multiBalanceReport* and budgetReport*. --- hledger/Hledger/Cli/Commands/Balance.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Balance.hs b/hledger/Hledger/Cli/Commands/Balance.hs index bad037915..901dba660 100644 --- a/hledger/Hledger/Cli/Commands/Balance.hs +++ b/hledger/Hledger/Cli/Commands/Balance.hs @@ -413,15 +413,15 @@ balance opts@CliOpts{reportspec_=rspec} j = case balancecalc_ of _ -> do -- single period simple balance report let report = styleAmounts styles $ balanceReport rspec j -- simple Ledger-style balance report render = case fmt of - "txt" -> \ropts1 -> TB.toLazyText . balanceReportAsText ropts1 - "csv" -> \ropts1 -> printCSV . balanceReportAsCsv ropts1 - "tsv" -> \ropts1 -> printTSV . balanceReportAsCsv ropts1 - "html" -> \ropts1 -> (<>"\n") . L.renderText . - printHtml . map (map (fmap L.toHtml)) . balanceReportAsSpreadsheet ropts1 - "json" -> const $ (<>"\n") . toJsonText - "fods" -> \ropts1 -> printFods IO.localeEncoding . Map.singleton "Hledger" . (,) (Just 1, Nothing) . balanceReportAsSpreadsheet ropts1 + "txt" -> TB.toLazyText . balanceReportAsText ropts + "csv" -> printCSV . balanceReportAsCsv ropts + "tsv" -> printTSV . balanceReportAsCsv ropts + "html" -> (<>"\n") . L.renderText . + printHtml . map (map (fmap L.toHtml)) . balanceReportAsSpreadsheet ropts + "json" -> (<>"\n") . toJsonText + "fods" -> printFods IO.localeEncoding . Map.singleton "Hledger" . (,) (Just 1, Nothing) . balanceReportAsSpreadsheet ropts _ -> error' $ unsupportedOutputFormatError fmt -- PARTIAL: - writeOutputLazyText opts $ render ropts report + writeOutputLazyText opts $ render report where styles = journalCommodityStylesWith HardRounding j ropts@ReportOpts{..} = _rsReportOpts rspec