HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehledger-lib-1.52.4GHC2021

Hledger.Reports.ReportTypes

New common report types, used by the BudgetReport for now, perhaps all reports later.

  • 10 types
  • 10 values
  • Packagehledger-lib-1.52.4
  • Exports20
  • LanguageGHC2021
  • LicenceGPL-3.0-or-later
  • SourceReportTypes.hs
datadata PeriodicReport a b
#

A periodic report is a generic tabular report, where each row corresponds to some label (usually an account name) and each column to a date period. The column periods are usually consecutive subperiods formed by splitting the overall report period by some report interval (daily, weekly, etc.). It has:

  1. a list of each column's period (date span)

  2. a list of rows, each containing:

  • an account label

  • the account's depth

  • A list of amounts, one for each column. Depending on the value type, these can represent balance changes, ending balances, budget performance, etc. (for example, see BalanceAccumulation and Hledger.Cli.Commands.Balance).

  • the total of the row's amounts for a periodic report, or zero for cumulative/historical reports (since summing end balances generally doesn't make sense).

  • the average of the row's amounts

  1. the column totals, and the overall grand total (or zero for cumulative/historical reports) and grand average.

Instances8Bifunctor, Functor, Show, Generic, ToJSON, HasAmounts, …
datadata PeriodicReportRow a b
#
Instances8Bifunctor, Functor, Show, Generic, Semigroup, ToJSON, …
datadata CompoundPeriodicReport a b
#

A compound balance report has:

  • an overall title

  • the period (date span) of each column

  • one or more named, normal-positive multi balance reports, with columns corresponding to the above, and a flag indicating whether they increased or decreased the overall totals

  • a list of overall totals for each column, and their grand total and average

It is used in compound balance report commands like balancesheet, cashflow and incomestatement.

Instances6Functor, Show, Generic, ToJSON, HasAmounts, Rep
datadata CBCSubreportSpec a
#

Description of one subreport within a compound balance report. Part of a CompoundBalanceCommandSpec, but also used in hledger-lib.

Constructors

datadata DisplayName
#

A full name, display name, and indent level for an account.

Instances4Eq, Ord, Show, ToJSON
  • Eq DisplayNameDefined in hledger-lib-1.52.4 · Hledger.Reports.ReportTypes
  • Ord DisplayNameDefined in hledger-lib-1.52.4 · Hledger.Reports.ReportTypes
  • Show DisplayNameDefined in hledger-lib-1.52.4 · Hledger.Reports.ReportTypes
  • ToJSON DisplayNameDefined in hledger-lib-1.52.4 · Hledger.Reports.ReportTypes