A Ledger
stores, for efficiency, a RawLedger
plus its tree of account
names, and a map from account names to Account
s. It may also have had
uninteresting Entry
s and Transaction
s filtered out.
- cacheLedger :: [String] -> RawLedger -> Ledger
- filtertxns :: [String] -> [Transaction] -> [Transaction]
- accountnames :: Ledger -> [AccountName]
- ledgerAccount :: Ledger -> AccountName -> Account
- accounts :: Ledger -> [Account]
- topAccounts :: Ledger -> [Account]
- accountsMatching :: [String] -> Ledger -> [Account]
- subAccounts :: Ledger -> Account -> [Account]
- ledgerTransactions :: Ledger -> [Transaction]
- ledgerAccountTree :: Int -> Ledger -> Tree Account
- ledgerAccountTreeAt :: Ledger -> Account -> Maybe (Tree Account)
Documentation
cacheLedger :: [String] -> RawLedger -> LedgerSource
Convert a raw ledger to a more efficient cached type, described above.
filtertxns :: [String] -> [Transaction] -> [Transaction]Source
accountnames :: Ledger -> [AccountName]Source
List a ledger's account names.
ledgerAccount :: Ledger -> AccountName -> AccountSource
Get the named account from a ledger.
topAccounts :: Ledger -> [Account]Source
List a ledger's top-level accounts, in tree order
accountsMatching :: [String] -> Ledger -> [Account]Source
Accounts in ledger whose name matches the pattern, in tree order.
subAccounts :: Ledger -> Account -> [Account]Source
List a ledger account's immediate subaccounts
ledgerTransactions :: Ledger -> [Transaction]Source
List a ledger's transactions.