{-|
All the main data types, defined here to avoid import cycles.
See the corresponding modules for documentation.
-}moduleLedger.TypeswhereimportLedger.UtilsimportqualifiedData.MapasMaptypeAccountName=StringdataSide=L|Rderiving(Eq,Show,Ord)dataCommodity=Commodity{symbol::String,-- ^ the commodity's symbol-- display preferences for amounts of this commodityside::Side,-- ^ should the symbol appear on the left or the rightspaced::Bool,-- ^ should there be a space between symbol and quantitycomma::Bool,-- ^ should thousands be comma-separatedprecision::Int-- ^ number of decimal places to display}deriving(Eq,Show,Ord)dataAmount=Amount{commodity::Commodity,quantity::Double,price::MaybeMixedAmount-- ^ optional per-unit price for this amount at the time of entry}deriving(Eq)newtypeMixedAmount=Mixed[Amount]deriving(Eq)dataTransactionType=RegularTransaction|VirtualTransaction|BalancedVirtualTransactionderiving(Eq,Show)dataRawTransaction=RawTransaction{taccount::AccountName,tamount::MixedAmount,tcomment::String,rttype::TransactionType}deriving(Eq)-- | a ledger "modifier" entry. Currently ignored.dataModifierEntry=ModifierEntry{valueexpr::String,m_transactions::[RawTransaction]}deriving(Eq)-- | a ledger "periodic" entry. Currently ignored.dataPeriodicEntry=PeriodicEntry{periodexpr::String,p_transactions::[RawTransaction]}deriving(Eq)dataEntry=Entry{edate::Date,estatus::Bool,ecode::String,edescription::String,ecomment::String,etransactions::[RawTransaction],epreceding_comment_lines::String}deriving(Eq)dataRawLedger=RawLedger{modifier_entries::[ModifierEntry],periodic_entries::[PeriodicEntry],entries::[Entry],final_comment_lines::String}deriving(Eq)dataTimeLogEntry=TimeLogEntry{tlcode::Char,tldatetime::DateTime,tlcomment::String}deriving(Eq,Ord)dataTimeLog=TimeLog{timelog_entries::[TimeLogEntry]}deriving(Eq)dataTransaction=Transaction{entryno::Int,date::Date,description::String,account::AccountName,amount::MixedAmount,ttype::TransactionType}deriving(Eq)dataAccount=Account{aname::AccountName,atransactions::[Transaction],abalance::MixedAmount}dataLedger=Ledger{rawledger::RawLedger,accountnametree::TreeAccountName,accountmap::Map.MapAccountNameAccount}