From db97fae34858230629908b9b51a668d55d74cc89 Mon Sep 17 00:00:00 2001 From: Stephen Morgan Date: Fri, 23 Oct 2020 23:15:32 +1100 Subject: [PATCH] lib: Add documentation for CBCSubreportSpec. --- hledger-lib/Hledger/Reports/ReportTypes.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hledger-lib/Hledger/Reports/ReportTypes.hs b/hledger-lib/Hledger/Reports/ReportTypes.hs index 301bf331a..e6a8c51ea 100644 --- a/hledger-lib/Hledger/Reports/ReportTypes.hs +++ b/hledger-lib/Hledger/Reports/ReportTypes.hs @@ -153,11 +153,13 @@ data CompoundPeriodicReport a b = CompoundPeriodicReport -- | Description of one subreport within a compound balance report. -- Part of a "CompoundBalanceCommandSpec", but also used in hledger-lib. data CBCSubreportSpec a = CBCSubreportSpec - { cbcsubreporttitle :: String - , cbcsubreportquery :: Journal -> Query - , cbcsubreportoptions :: ReportOpts -> ReportOpts - , cbcsubreporttransform :: PeriodicReport DisplayName MixedAmount -> PeriodicReport a MixedAmount - , cbcsubreportincreasestotal :: Bool + { cbcsubreporttitle :: String -- ^ The title to use for the subreport + , cbcsubreportquery :: Journal -> Query -- ^ The Query to use for the subreport + , cbcsubreportoptions :: ReportOpts -> ReportOpts -- ^ A function to transform the ReportOpts used to produce the subreport + , cbcsubreporttransform :: PeriodicReport DisplayName MixedAmount -> PeriodicReport a MixedAmount -- ^ A function to transform the result of the subreport + , cbcsubreportincreasestotal :: Bool -- ^ Whether the subreport and overall report total are of the same sign (e.g. Assets are normally + -- positive in a balance sheet report, as is the overall total. Liabilities are normally of the + -- opposite sign.) }