Account has a name, a list of subaccounts, an optional parent
account, and subaccounting-excluding and -including balances.
- nullacct :: Account
- accountsFromPostings :: [Posting] -> [Account]
- nameTreeToAccount :: AccountName -> FastTree AccountName -> Account
- tieAccountParents :: Account -> Account
- parentAccounts :: Account -> [Account]
- accountsLevels :: Account -> [[Account]]
- mapAccounts :: (Account -> Account) -> Account -> Account
- anyAccounts :: (Account -> Bool) -> Account -> Bool
- sumAccounts :: Account -> Account
- clipAccounts :: Int -> Account -> Account
- pruneAccounts :: (Account -> Bool) -> Account -> Maybe Account
- flattenAccounts :: Account -> [Account]
- filterAccounts :: (Account -> Bool) -> Account -> [Account]
- lookupAccount :: AccountName -> [Account] -> Maybe Account
- printAccounts :: Account -> IO ()
- showAccounts :: Account -> String
- showAccountsBoringFlag :: Account -> String
- showAccountDebug :: PrintfType ([Char] -> t) => Account -> t
- tests_Hledger_Data_Account :: Test
Derive an account tree with balances from a set of postings. (*ledger's core feature.) The accounts are returned in a list, but retain their tree structure; the first one is the root of the tree.
Convert an AccountName tree to an Account tree
Tie the knot so all subaccounts' parents are set correctly.
Get this account's parent accounts, from the nearest up to the root.
Map a (non-tree-structure-modifying) function over this and sub accounts.
Is the predicate true on any of this account or its subaccounts ?
Add subaccount-inclusive balances to an account tree. -- , also noting -- whether it has an interesting balance or interesting subs to help -- with eliding later.
Remove all leaf accounts and subtrees matching a predicate.
Flatten an account tree into a list, which is sometimes convenient. Note since accounts link to their parents/subs, the account tree remains intact and can still be used. It's a tree/list!
Filter an account tree (to a list).