Most data types are defined here to avoid import cycles. Here is an overview of the hledger data model:
Journal -- a journal is derived from one or more data files. It contains.. [Transaction] -- journal transactions, which have date, status, code, description and.. [Posting] -- multiple account postings (entries), which have account name and amount. [HistoricalPrice] -- historical commodity prices Ledger -- a ledger is derived from a journal, by applying a filter specification. It contains.. Journal -- the filtered journal, containing only the transactions and postings we are interested in Tree AccountName -- account names referenced in the journal's transactions, as a tree Map AccountName Account -- per-account postings and balances from the journal's transactions, as a map from account name to account info
For more detailed documentation on each type, see the corresponding modules.
Evolution of transactionentryposting terminology:
- ledger 2: entries contain transactions
- hledger 0.4: Entrys contain RawTransactions (which are flattened to Transactions)
- ledger 3: transactions contain postings
- hledger 0.5: LedgerTransactions contain Postings (which are flattened to Transactions)
- hledger 0.8: Transactions contain Postings (referencing Transactions, corecursively)
- hledger 0.10: Postings should be called Entrys, but are left as-is for now
- type SmartDate = (String, String, String)
- data WhichDate
- data DateSpan = DateSpan (Maybe Day) (Maybe Day)
- data Interval
- type AccountName = String
- data Side
- data Commodity = Commodity {}
- data Amount = Amount {}
- newtype MixedAmount = Mixed [Amount]
- data PostingType
- data Posting = Posting {}
- data Transaction = Transaction {}
- data ModifierTransaction = ModifierTransaction {
- mtvalueexpr :: String
- mtpostings :: [Posting]
- data PeriodicTransaction = PeriodicTransaction {
- ptperiodicexpr :: String
- ptpostings :: [Posting]
- data TimeLogCode
- = SetBalance
- | SetRequiredHours
- | In
- | Out
- | FinalOut
- data TimeLogEntry = TimeLogEntry {}
- data HistoricalPrice = HistoricalPrice {}
- data Journal = Journal {}
- data Ledger = Ledger {}
- data Account = Account {
- aname :: AccountName
- apostings :: [Posting]
- abalance :: MixedAmount
- data FilterSpec = FilterSpec {}
Documentation
type AccountName = StringSource
Commodity | |
|
newtype MixedAmount Source
data PostingType Source
Posting | |
|
data TimeLogCode Source
data TimeLogEntry Source
Account | |
|
data FilterSpec Source
A generic, pure specification of how to filter transactions and postings.
FilterSpec | |
|