Ledger.Types
Description
Most data types are defined here to avoid import cycles. Here is an overview of the hledger data model:
Ledger -- hledger's ledger is a journal file plus cached/derived data
Journal -- a representation of the journal file, containing..
[Transaction] -- ..journal transactions, which have date, status, code, description and..
[Posting] -- ..two or more account postings (account name and amount)
Tree AccountName -- all account names as a tree
Map AccountName Account -- a map from account name to account info (postings and balances)
For more detailed documentation on each type, see the corresponding modules.
Terminology has been in flux:
- ledger 2 had entries containing transactions.
- hledger 0.4 had Entrys containing RawTransactions, which were flattened to Transactions.
- ledger 3 has transactions containing postings.
- hledger 0.5 had LedgerTransactions containing Postings, which were flattened to Transactions.
- hledger 0.8 has Transactions containing Postings, and no flattened type.
- 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 Account = Account {
- aname :: AccountName
- apostings :: [Posting]
- abalance :: MixedAmount
- data Ledger = Ledger {}
- data FilterSpec = FilterSpec {}
Documentation
type AccountName = StringSource
Constructors
| Commodity | |
Fields
| |
Constructors
| Amount | |
newtype MixedAmount Source
Instances
Constructors
| Posting | |
Fields
| |
data ModifierTransaction Source
Constructors
| ModifierTransaction | |
Fields
| |
Instances
data PeriodicTransaction Source
Constructors
| PeriodicTransaction | |
Fields
| |
Instances
data TimeLogEntry Source
Constructors
| TimeLogEntry | |
Fields
| |
Instances
Constructors
| Journal | |
Fields | |
Constructors
| Account | |
Fields
| |
Constructors
| Ledger | |
Fields | |
data FilterSpec Source
A generic, pure specification of how to filter transactions/postings. This exists to keep app-specific options out of the hledger library.
Constructors
| FilterSpec | |
Fields
| |
Instances