| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Hledger.Data.Types
Contents
Description
Most data types are defined here to avoid import cycles. Here is an overview of the hledger data model:
Journal -- a journal is read from one or more data files. It contains.. [Transaction] -- journal transactions (aka entries), which have date, cleared status, code, description and.. [Posting] -- multiple account postings, which have account name and amount [MarketPrice] -- historical market prices for commodities Ledger -- a ledger is derived from a journal, by applying a filter specification and doing some further processing. It contains.. Journal -- a filtered copy of the original journal, containing only the transactions and postings we are interested in [Account] -- all accounts, in tree order beginning with a "root" account", with their balances and sub/parent accounts
For more detailed documentation on each type, see the corresponding modules.
Synopsis
- fromEFDay :: EFDay -> Day
- isBalanceSheetAccountType :: AccountType -> Bool
- isDecimalMark :: Char -> Bool
- isHiddenTagName :: TagName -> Bool
- isIncomeStatementAccountType :: AccountType -> Bool
- maCompare :: MixedAmount -> MixedAmount -> Ordering
- mixedAmountKey :: Amount -> MixedAmountKey
- modifyEFDay :: (Day -> Day) -> EFDay -> EFDay
- nullaccountdeclarationinfo :: AccountDeclarationInfo
- nullpayeedeclarationinfo :: PayeeDeclarationInfo
- nullperiodictransaction :: PeriodicTransaction
- nullsourcepos :: SourcePos
- nullsourcepospair :: (SourcePos, SourcePos)
- nulltagdeclarationinfo :: TagDeclarationInfo
- nulltransactionmodifier :: TransactionModifier
- showMarketPrice :: MarketPrice -> String
- showMarketPrices :: [MarketPrice] -> [Char]
- toHiddenTag :: Tag -> HiddenTag
- toHiddenTagName :: TagName -> TagName
- toVisibleTag :: HiddenTag -> Tag
- toVisibleTagName :: TagName -> TagName
- data Account a = Account {
- aname :: AccountName
- adeclarationinfo :: Maybe AccountDeclarationInfo
- asubs :: [Account a]
- aparent :: Maybe (Account a)
- aboring :: Bool
- adata :: PeriodData a
- data AccountAlias
- data AccountDeclarationInfo = AccountDeclarationInfo {
- adicomment :: Text
- aditags :: [Tag]
- adideclarationorder :: Int
- adisourcepos :: SourcePos
- type AccountName = Text
- data AccountType
- = Asset
- | Liability
- | Equity
- | Revenue
- | Expense
- | Cash
- | Conversion
- | Gain
- | UnrealisedGain
- | Imbalance
- data Amount = Amount {
- acommodity :: !CommoditySymbol
- aquantity :: !Quantity
- astyle :: !AmountStyle
- acost :: !(Maybe AmountCost)
- acostbasis :: !(Maybe CostBasis)
- data AmountCost
- data AmountPrecision
- = Precision !Word8
- | NaturalPrecision
- data AmountStyle = AmountStyle {
- ascommodityside :: !Side
- ascommodityspaced :: !Bool
- asdigitgroups :: !(Maybe DigitGroupStyle)
- asdecimalmark :: !(Maybe Char)
- asprecision :: !AmountPrecision
- asrounding :: !Rounding
- data AssertDirective = AssertDirective {
- adQuantifier :: AssertQuantifier
- adPeriod :: Maybe (Interval, DateSpan)
- adPeriodText :: Text
- adQueryText :: Text
- adSkips :: [DateSpan]
- adSourceText :: Text
- adSourcePos :: SourcePos
- data AssertQuantifier
- data BalanceAssertion = BalanceAssertion {
- baamount :: Amount
- batotal :: Bool
- bainclusive :: Bool
- baposition :: SourcePos
- data BalanceData = BalanceData {}
- data Commodity = Commodity {
- csymbol :: CommoditySymbol
- cformat :: Maybe AmountStyle
- ccomment :: Text
- ctags :: [Tag]
- caliases :: [(Amount, SourcePos)]
- csourcepos :: SourcePos
- type CommoditySymbol = Text
- data CostBasis = CostBasis {}
- data DateSpan = DateSpan (Maybe EFDay) (Maybe EFDay)
- type DateTag = (TagName, Day)
- type DecimalMark = Char
- data DepthSpec = DepthSpec {
- dsFlatDepth :: Maybe Int
- dsRegexpDepths :: [(Regexp, Int)]
- data DigitGroupStyle = DigitGroups !Char ![Word8]
- data EFDay
- data FastPathStats = FastPathStats {
- fpsTxnsFast :: Int
- fpsTxnsGeneral :: Int
- fpsPricesFast :: Int
- fpsPricesGeneral :: Int
- fpsDeclines :: Map Text Int
- class HasAmounts a where
- styleAmounts :: Map CommoditySymbol AmountStyle -> a -> a
- type HiddenTag = Tag
- data Interval
- = NoInterval
- | Days Int
- | Weeks Int
- | Months Int
- | Quarters Int
- | Years Int
- | NthWeekdayOfMonth Int Int
- | MonthDay Int
- | MonthAndDay Int Int
- | DaysOfWeek [Int]
- data Journal = Journal {
- jparsedefaultyear :: Maybe Year
- jparseapplyyears :: [Maybe Year]
- jparsedefaultcommodity :: Maybe (CommoditySymbol, AmountStyle)
- jparsedecimalmark :: Maybe DecimalMark
- jparseparentaccounts :: [AccountName]
- jparsealiases :: [AccountAlias]
- jparseoptaliases :: [AccountAlias]
- jparsetimeclockentries :: [TimeclockEntry]
- jparseincludefilestack :: [(FilePath, FilePath)]
- jparsepos :: Maybe ParsePos
- jparseamountstyles :: Set AmountStyle
- jparsetexts :: Set Text
- jparsefastpathstats :: FastPathStats
- jdeclaredpayees :: [(Payee, PayeeDeclarationInfo)]
- jdeclaredtags :: [(TagName, TagDeclarationInfo)]
- jdeclaredaccounts :: [(AccountName, AccountDeclarationInfo)]
- jdeclaredaccounttags :: Map AccountName [Tag]
- jdeclaredaccounttypes :: Map AccountType [AccountName]
- jaccounttypes :: Map AccountName AccountType
- jdeclaredcommodities :: Map CommoditySymbol Commodity
- jdeclaredcommoditytags :: Map CommoditySymbol [Tag]
- jinferredcommoditystyles :: Map CommoditySymbol AmountStyle
- jglobalcommoditystyles :: Map CommoditySymbol AmountStyle
- jpricedirectives :: [PriceDirective]
- jinferredmarketprices :: [MarketPrice]
- jtxnmodifiers :: [TransactionModifier]
- jperiodictxns :: [PeriodicTransaction]
- jasserts :: [AssertDirective]
- jtxns :: [Transaction]
- jitems :: [JournalItem]
- jfiles :: [JournalFile]
- jauxfiles :: [(FilePath, [FilePath])]
- jlastreadtime :: POSIXTime
- data JournalFile = JournalFile {}
- data JournalItem
- = JITransaction !SourcePos
- | JIComment !Text
- | JICommentBlock !Text
- | JIDirective !Text
- | JINonExportedDirective !Text
- | JIInclude !Text
- | JIBlank
- data Ledger = Ledger {
- ljournal :: Journal
- laccounts :: [Account BalanceData]
- data LotId = LotId {}
- data MarketPrice = MarketPrice {
- mpdate :: Day
- mpfrom :: CommoditySymbol
- mpto :: CommoditySymbol
- mprate :: Quantity
- newtype MixedAmount = Mixed (Map MixedAmountKey Amount)
- data MixedAmountKey
- type Month = Int
- type MonthDay = Int
- type MonthWeek = Int
- data NormalSign
- data ParsePos = ParsePos {
- ppSourcePos :: SourcePos
- ppOffset :: Int
- ppInput :: Text
- type ParsedJournal = Journal
- type Payee = Text
- data PayeeDeclarationInfo = PayeeDeclarationInfo {
- pdicomment :: Text
- pditags :: [Tag]
- data Period
- = DayPeriod Day
- | WeekPeriod Day
- | MonthPeriod Year Month
- | QuarterPeriod Year Quarter
- | YearPeriod Year
- | PeriodBetween Day Day
- | PeriodFrom Day
- | PeriodTo Day
- | PeriodAll
- data PeriodData a = PeriodData {}
- data PeriodicTransaction = PeriodicTransaction {
- ptperiodexpr :: Text
- ptinterval :: Interval
- ptspan :: DateSpan
- ptsourcepos :: (SourcePos, SourcePos)
- ptstatus :: Status
- ptcode :: Text
- ptdescription :: Text
- ptcomment :: Text
- pttags :: [Tag]
- ptpostings :: [Posting]
- data Posting = Posting {
- pdate :: Maybe Day
- pdate2 :: Maybe Day
- pstatus :: Status
- paccount :: AccountName
- pamount :: MixedAmount
- pcomment :: Text
- preal :: PostingRealness
- ptags :: [Tag]
- pbalanceassertion :: Maybe BalanceAssertion
- ptransaction :: Maybe Transaction
- poriginal :: Maybe Posting
- data PostingRealness
- data PriceDirective = PriceDirective {
- pdsourcepos :: SourcePos
- pddate :: Day
- pdcommodity :: CommoditySymbol
- pdamount :: Amount
- type Quantity = Decimal
- type Quarter = Int
- data ReductionMethod
- data Rounding
- data SepFormat
- data Side
- data SmartDate
- = SmartCompleteDate Day
- | SmartAssumeStart Year (Maybe Month)
- | SmartFromReference (Maybe Month) MonthDay
- | SmartMonth Month
- | SmartRelative Integer SmartInterval
- | SmartRelativeMonth Ordering Month
- | SmartRelativeWeekDay Ordering WeekDay
- data SmartInterval
- data Status
- data StorageFormat
- data TMPostingRule = TMPostingRule {
- tmprPosting :: Posting
- tmprIsMultiplier :: Bool
- type Tag = (TagName, TagValue)
- newtype TagDeclarationInfo = TagDeclarationInfo {
- tdicomment :: Text
- type TagName = Text
- type TagValue = Text
- data TimeclockCode
- = SetBalance
- | SetRequiredHours
- | In
- | Out
- | FinalOut
- data TimeclockEntry = TimeclockEntry {
- tlsourcepos :: SourcePos
- tlcode :: TimeclockCode
- tldatetime :: LocalTime
- tlaccount :: AccountName
- tldescription :: Text
- tlcomment :: Text
- tltags :: [Tag]
- data Transaction = Transaction {}
- data TransactionModifier = TransactionModifier {
- tmquerytxt :: Text
- tmpostingrules :: [TMPostingRule]
- type WeekDay = Int
- data WhichDate
- type YearDay = Int
- type YearWeek = Int
- type Year = Integer
Documentation
isBalanceSheetAccountType :: AccountType -> Bool Source #
isDecimalMark :: Char -> Bool Source #
isHiddenTagName :: TagName -> Bool Source #
Does this tag name begin with the hidden tag prefix (_) ?
isIncomeStatementAccountType :: AccountType -> Bool Source #
maCompare :: MixedAmount -> MixedAmount -> Ordering Source #
Compare two MixedAmounts, substituting 0 for the quantity of any missing commodities in either.
mixedAmountKey :: Amount -> MixedAmountKey Source #
Calculate the key for storing this Amount within a MixedAmount, from its commodity and transacted cost (ignoring cost basis).
modifyEFDay :: (Day -> Day) -> EFDay -> EFDay Source #
showMarketPrice :: MarketPrice -> String Source #
showMarketPrices :: [MarketPrice] -> [Char] Source #
toHiddenTag :: Tag -> HiddenTag Source #
Add the _ prefix to a normal visible tag's name, making it a hidden tag.
toHiddenTagName :: TagName -> TagName Source #
Add the _ prefix to a normal visible tag's name, making it a hidden tag.
toVisibleTag :: HiddenTag -> Tag Source #
Drop the _ prefix from a hidden tag's name, making it a normal visible tag.
toVisibleTagName :: TagName -> TagName Source #
Drop the _ prefix from a hidden tag's name, making it a normal visible tag.
An account within a hierarchy, with references to its parent
and subaccounts if any, and with per-report-period data of type a.
Only the name is required; the other fields may or may not be present.
Constructors
| Account | |
Fields
| |
Instances
| Functor Account Source # | |||||
| FromJSON a => FromJSON (Account a) | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser (Account a) parseJSONList :: Value -> Parser [Account a] omittedField :: Maybe (Account a) | |||||
| ToJSON a => ToJSON (Account a) | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Account a -> Encoding toJSONList :: [Account a] -> Value toEncodingList :: [Account a] -> Encoding | |||||
| Eq (Account a) | |||||
| Generic (Account a) Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show a => Show (Account a) | |||||
| HasAmounts a => HasAmounts (Account a) Source # | |||||
Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Account a -> Account a Source # | |||||
| type Rep (Account a) Source # | |||||
Defined in Hledger.Data.Types type Rep (Account a) = D1 ('MetaData "Account" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Account" 'PrefixI 'True) ((S1 ('MetaSel ('Just "aname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccountName) :*: (S1 ('MetaSel ('Just "adeclarationinfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AccountDeclarationInfo)) :*: S1 ('MetaSel ('Just "asubs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Account a]))) :*: (S1 ('MetaSel ('Just "aparent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Account a))) :*: (S1 ('MetaSel ('Just "aboring") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "adata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PeriodData a)))))) | |||||
data AccountAlias Source #
Constructors
| BasicAlias AccountName AccountName | |
| RegexAlias Regexp Replacement |
Instances
| ToJSON AccountAlias | |||||
Defined in Hledger.Data.Json Methods toJSON :: AccountAlias -> Value toEncoding :: AccountAlias -> Encoding toJSONList :: [AccountAlias] -> Value toEncodingList :: [AccountAlias] -> Encoding omitField :: AccountAlias -> Bool | |||||
| NFData AccountAlias Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AccountAlias -> () | |||||
| Eq AccountAlias Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord AccountAlias Source # | |||||
Defined in Hledger.Data.Types Methods compare :: AccountAlias -> AccountAlias -> Ordering (<) :: AccountAlias -> AccountAlias -> Bool (<=) :: AccountAlias -> AccountAlias -> Bool (>) :: AccountAlias -> AccountAlias -> Bool (>=) :: AccountAlias -> AccountAlias -> Bool max :: AccountAlias -> AccountAlias -> AccountAlias min :: AccountAlias -> AccountAlias -> AccountAlias | |||||
| Generic AccountAlias Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Read AccountAlias Source # | |||||
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AccountAlias readList :: ReadS [AccountAlias] readPrec :: ReadPrec AccountAlias readListPrec :: ReadPrec [AccountAlias] | |||||
| Show AccountAlias Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountAlias -> ShowS show :: AccountAlias -> String showList :: [AccountAlias] -> ShowS | |||||
| type Rep AccountAlias Source # | |||||
Defined in Hledger.Data.Types type Rep AccountAlias = D1 ('MetaData "AccountAlias" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "BasicAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccountName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccountName)) :+: C1 ('MetaCons "RegexAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Regexp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Replacement))) | |||||
data AccountDeclarationInfo Source #
Extra information about an account that can be derived from its account directive (and the other account directives).
Constructors
| AccountDeclarationInfo | |
Fields
| |
Instances
| FromJSON AccountDeclarationInfo | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AccountDeclarationInfo parseJSONList :: Value -> Parser [AccountDeclarationInfo] omittedField :: Maybe AccountDeclarationInfo | |||||
| ToJSON AccountDeclarationInfo | |||||
Defined in Hledger.Data.Json Methods toJSON :: AccountDeclarationInfo -> Value toEncoding :: AccountDeclarationInfo -> Encoding toJSONList :: [AccountDeclarationInfo] -> Value toEncodingList :: [AccountDeclarationInfo] -> Encoding omitField :: AccountDeclarationInfo -> Bool | |||||
| NFData AccountDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AccountDeclarationInfo -> () | |||||
| Eq AccountDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: AccountDeclarationInfo -> AccountDeclarationInfo -> Bool (/=) :: AccountDeclarationInfo -> AccountDeclarationInfo -> Bool | |||||
| Generic AccountDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: AccountDeclarationInfo -> Rep AccountDeclarationInfo x to :: Rep AccountDeclarationInfo x -> AccountDeclarationInfo | |||||
| Show AccountDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountDeclarationInfo -> ShowS show :: AccountDeclarationInfo -> String showList :: [AccountDeclarationInfo] -> ShowS | |||||
| type Rep AccountDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types type Rep AccountDeclarationInfo = D1 ('MetaData "AccountDeclarationInfo" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "AccountDeclarationInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "adicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "aditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag])) :*: (S1 ('MetaSel ('Just "adideclarationorder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "adisourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos)))) | |||||
type AccountName = Text Source #
data AccountType Source #
Constructors
| Asset | |
| Liability | |
| Equity | |
| Revenue | |
| Expense | |
| Cash | a subtype of Asset - liquid assets to show in cashflow report |
| Conversion | a subtype of Equity - account with which to balance commodity conversions |
| Gain | a subtype of Revenue - realised capital gains/losses |
| UnrealisedGain | a subtype of Equity - accumulated unrealised capital gains/losses |
| Imbalance | a subtype of Equity - transactions' tolerated imbalances, shown by --infer-imbalance |
Instances
| ToJSON AccountType | |||||
Defined in Hledger.Data.Json Methods toJSON :: AccountType -> Value toEncoding :: AccountType -> Encoding toJSONList :: [AccountType] -> Value toEncodingList :: [AccountType] -> Encoding omitField :: AccountType -> Bool | |||||
| ToJSONKey AccountType | |||||
Defined in Hledger.Data.Json | |||||
| NFData AccountType Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AccountType -> () | |||||
| Eq AccountType Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord AccountType Source # | |||||
Defined in Hledger.Data.Types Methods compare :: AccountType -> AccountType -> Ordering (<) :: AccountType -> AccountType -> Bool (<=) :: AccountType -> AccountType -> Bool (>) :: AccountType -> AccountType -> Bool (>=) :: AccountType -> AccountType -> Bool max :: AccountType -> AccountType -> AccountType min :: AccountType -> AccountType -> AccountType | |||||
| Bounded AccountType Source # | |||||
Defined in Hledger.Data.Types | |||||
| Enum AccountType Source # | |||||
Defined in Hledger.Data.Types Methods succ :: AccountType -> AccountType pred :: AccountType -> AccountType toEnum :: Int -> AccountType fromEnum :: AccountType -> Int enumFrom :: AccountType -> [AccountType] enumFromThen :: AccountType -> AccountType -> [AccountType] enumFromTo :: AccountType -> AccountType -> [AccountType] enumFromThenTo :: AccountType -> AccountType -> AccountType -> [AccountType] | |||||
| Generic AccountType Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show AccountType Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountType -> ShowS show :: AccountType -> String showList :: [AccountType] -> ShowS | |||||
| type Rep AccountType Source # | |||||
Defined in Hledger.Data.Types type Rep AccountType = D1 ('MetaData "AccountType" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (((C1 ('MetaCons "Asset" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Liability" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Equity" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Revenue" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Expense" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Cash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Conversion" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Gain" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnrealisedGain" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Imbalance" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||
Constructors
| Amount | |
Fields
| |
Instances
| FromJSON Amount | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Amount parseJSONList :: Value -> Parser [Amount] omittedField :: Maybe Amount | |||||
| ToJSON Amount | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Amount -> Encoding toJSONList :: [Amount] -> Value toEncodingList :: [Amount] -> Encoding | |||||
| NFData Amount Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Amount Source # | |||||
| Ord Amount Source # | |||||
| Generic Amount Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Num Amount | |||||
| Show Amount Source # | |||||
| HasAmounts Amount Source # | |||||
Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Amount -> Amount Source # | |||||
| type Rep Amount Source # | |||||
Defined in Hledger.Data.Types type Rep Amount = D1 ('MetaData "Amount" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Amount" 'PrefixI 'True) ((S1 ('MetaSel ('Just "acommodity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "aquantity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)) :*: (S1 ('MetaSel ('Just "astyle") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AmountStyle) :*: (S1 ('MetaSel ('Just "acost") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe AmountCost)) :*: S1 ('MetaSel ('Just "acostbasis") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe CostBasis)))))) | |||||
data AmountCost Source #
An amount's per-unit or total cost/selling price in another
commodity, as recorded in the journal entry eg with or @.
Cost, formerly AKA "transaction price". The amount is always positive.
Instances
| FromJSON AmountCost | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AmountCost parseJSONList :: Value -> Parser [AmountCost] omittedField :: Maybe AmountCost | |||||
| ToJSON AmountCost | |||||
Defined in Hledger.Data.Json Methods toJSON :: AmountCost -> Value toEncoding :: AmountCost -> Encoding toJSONList :: [AmountCost] -> Value toEncodingList :: [AmountCost] -> Encoding omitField :: AmountCost -> Bool | |||||
| NFData AmountCost Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AmountCost -> () | |||||
| Eq AmountCost Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord AmountCost Source # | |||||
Defined in Hledger.Data.Types Methods compare :: AmountCost -> AmountCost -> Ordering (<) :: AmountCost -> AmountCost -> Bool (<=) :: AmountCost -> AmountCost -> Bool (>) :: AmountCost -> AmountCost -> Bool (>=) :: AmountCost -> AmountCost -> Bool max :: AmountCost -> AmountCost -> AmountCost min :: AmountCost -> AmountCost -> AmountCost | |||||
| Generic AmountCost Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show AmountCost Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountCost -> ShowS show :: AmountCost -> String showList :: [AmountCost] -> ShowS | |||||
| type Rep AmountCost Source # | |||||
Defined in Hledger.Data.Types type Rep AmountCost = D1 ('MetaData "AmountCost" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "UnitCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Amount)) :+: C1 ('MetaCons "TotalCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Amount))) | |||||
data AmountPrecision Source #
The "display precision" for a hledger amount, by which we mean the number of decimal digits to display to the right of the decimal mark.
Constructors
| Precision !Word8 | show this many decimal digits (0..255) |
| NaturalPrecision | show all significant decimal digits stored internally |
Instances
| FromJSON AmountPrecision | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AmountPrecision parseJSONList :: Value -> Parser [AmountPrecision] omittedField :: Maybe AmountPrecision | |||||
| ToJSON AmountPrecision | |||||
Defined in Hledger.Data.Json Methods toJSON :: AmountPrecision -> Value toEncoding :: AmountPrecision -> Encoding toJSONList :: [AmountPrecision] -> Value toEncodingList :: [AmountPrecision] -> Encoding omitField :: AmountPrecision -> Bool | |||||
| NFData AmountPrecision Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AmountPrecision -> () | |||||
| Eq AmountPrecision Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: AmountPrecision -> AmountPrecision -> Bool (/=) :: AmountPrecision -> AmountPrecision -> Bool | |||||
| Ord AmountPrecision Source # | |||||
Defined in Hledger.Data.Types Methods compare :: AmountPrecision -> AmountPrecision -> Ordering (<) :: AmountPrecision -> AmountPrecision -> Bool (<=) :: AmountPrecision -> AmountPrecision -> Bool (>) :: AmountPrecision -> AmountPrecision -> Bool (>=) :: AmountPrecision -> AmountPrecision -> Bool max :: AmountPrecision -> AmountPrecision -> AmountPrecision min :: AmountPrecision -> AmountPrecision -> AmountPrecision | |||||
| Generic AmountPrecision Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: AmountPrecision -> Rep AmountPrecision x to :: Rep AmountPrecision x -> AmountPrecision | |||||
| Read AmountPrecision Source # | |||||
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AmountPrecision readList :: ReadS [AmountPrecision] readPrec :: ReadPrec AmountPrecision readListPrec :: ReadPrec [AmountPrecision] | |||||
| Show AmountPrecision Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountPrecision -> ShowS show :: AmountPrecision -> String showList :: [AmountPrecision] -> ShowS | |||||
| type Rep AmountPrecision Source # | |||||
Defined in Hledger.Data.Types type Rep AmountPrecision = D1 ('MetaData "AmountPrecision" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Precision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)) :+: C1 ('MetaCons "NaturalPrecision" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
data AmountStyle Source #
Display styles for amounts - things which can be detected during parsing, such as commodity side and spacing, digit group marks, decimal mark, number of decimal digits etc. Every Amount has an AmountStyle. After amounts are parsed from the input, for each Commodity a standard style is inferred and then used when displaying amounts in that commodity. Related to AmountFormat but higher level.
See also: - hledger manual > Commodity styles - hledger manual > Amounts - hledger manual > Commodity display style
Constructors
| AmountStyle | |
Fields
| |
Instances
| FromJSON AmountStyle | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AmountStyle parseJSONList :: Value -> Parser [AmountStyle] omittedField :: Maybe AmountStyle | |||||
| ToJSON AmountStyle | |||||
Defined in Hledger.Data.Json Methods toJSON :: AmountStyle -> Value toEncoding :: AmountStyle -> Encoding toJSONList :: [AmountStyle] -> Value toEncodingList :: [AmountStyle] -> Encoding omitField :: AmountStyle -> Bool | |||||
| NFData AmountStyle Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AmountStyle -> () | |||||
| Eq AmountStyle Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord AmountStyle Source # | |||||
Defined in Hledger.Data.Types Methods compare :: AmountStyle -> AmountStyle -> Ordering (<) :: AmountStyle -> AmountStyle -> Bool (<=) :: AmountStyle -> AmountStyle -> Bool (>) :: AmountStyle -> AmountStyle -> Bool (>=) :: AmountStyle -> AmountStyle -> Bool max :: AmountStyle -> AmountStyle -> AmountStyle min :: AmountStyle -> AmountStyle -> AmountStyle | |||||
| Generic AmountStyle Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Read AmountStyle Source # | |||||
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AmountStyle readList :: ReadS [AmountStyle] readPrec :: ReadPrec AmountStyle readListPrec :: ReadPrec [AmountStyle] | |||||
| Show AmountStyle Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountStyle -> ShowS show :: AmountStyle -> String showList :: [AmountStyle] -> ShowS | |||||
| type Rep AmountStyle Source # | |||||
Defined in Hledger.Data.Types type Rep AmountStyle = D1 ('MetaData "AmountStyle" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "AmountStyle" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ascommodityside") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Side) :*: (S1 ('MetaSel ('Just "ascommodityspaced") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "asdigitgroups") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe DigitGroupStyle)))) :*: (S1 ('MetaSel ('Just "asdecimalmark") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Char)) :*: (S1 ('MetaSel ('Just "asprecision") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AmountPrecision) :*: S1 ('MetaSel ('Just "asrounding") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rounding))))) | |||||
data AssertDirective Source #
An assert directive: a standing rule, a query which must match no rows or some rows of the equivalent balance report, over the whole journal or in every period. The query is kept as text, since Hledger.Query depends on this module; it is validated when parsed, and parsed again when checked.
Constructors
| AssertDirective | |
Fields
| |
Instances
| NFData AssertDirective Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AssertDirective -> () | |||||
| Eq AssertDirective Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: AssertDirective -> AssertDirective -> Bool (/=) :: AssertDirective -> AssertDirective -> Bool | |||||
| Generic AssertDirective Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: AssertDirective -> Rep AssertDirective x to :: Rep AssertDirective x -> AssertDirective | |||||
| Show AssertDirective | |||||
Defined in Hledger.Data.Journal Methods showsPrec :: Int -> AssertDirective -> ShowS show :: AssertDirective -> String showList :: [AssertDirective] -> ShowS | |||||
| type Rep AssertDirective Source # | |||||
Defined in Hledger.Data.Types type Rep AssertDirective = D1 ('MetaData "AssertDirective" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "AssertDirective" 'PrefixI 'True) ((S1 ('MetaSel ('Just "adQuantifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AssertQuantifier) :*: (S1 ('MetaSel ('Just "adPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Interval, DateSpan))) :*: S1 ('MetaSel ('Just "adPeriodText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "adQueryText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "adSkips") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [DateSpan])) :*: (S1 ('MetaSel ('Just "adSourceText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "adSourcePos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos))))) | |||||
data AssertQuantifier Source #
Which rows an assert directive's query must match: none, or at least one.
Constructors
| AssertNone | |
| AssertSome |
Instances
| NFData AssertQuantifier Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: AssertQuantifier -> () | |||||
| Eq AssertQuantifier Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: AssertQuantifier -> AssertQuantifier -> Bool (/=) :: AssertQuantifier -> AssertQuantifier -> Bool | |||||
| Generic AssertQuantifier Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: AssertQuantifier -> Rep AssertQuantifier x to :: Rep AssertQuantifier x -> AssertQuantifier | |||||
| Show AssertQuantifier Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> AssertQuantifier -> ShowS show :: AssertQuantifier -> String showList :: [AssertQuantifier] -> ShowS | |||||
| type Rep AssertQuantifier Source # | |||||
Defined in Hledger.Data.Types type Rep AssertQuantifier = D1 ('MetaData "AssertQuantifier" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "AssertNone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AssertSome" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
data BalanceAssertion Source #
A balance assertion is a declaration about an account's expected balance at a certain point (posting date and parse order). They provide additional error checking and readability to a journal file.
A balance assignments is an instruction to hledger to adjust an account's balance to a certain amount at a certain point.
The BalanceAssertion type is used for representing both of these.
hledger supports multiple kinds of balance assertions/assignments, which differ in whether they refer to a single commodity or all commodities, and the (subaccount-)inclusive or exclusive account balance.
Constructors
| BalanceAssertion | |
Fields
| |
Instances
| FromJSON BalanceAssertion | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser BalanceAssertion parseJSONList :: Value -> Parser [BalanceAssertion] omittedField :: Maybe BalanceAssertion | |||||
| ToJSON BalanceAssertion | |||||
Defined in Hledger.Data.Json Methods toJSON :: BalanceAssertion -> Value toEncoding :: BalanceAssertion -> Encoding toJSONList :: [BalanceAssertion] -> Value toEncodingList :: [BalanceAssertion] -> Encoding omitField :: BalanceAssertion -> Bool | |||||
| NFData BalanceAssertion Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: BalanceAssertion -> () | |||||
| Eq BalanceAssertion Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: BalanceAssertion -> BalanceAssertion -> Bool (/=) :: BalanceAssertion -> BalanceAssertion -> Bool | |||||
| Generic BalanceAssertion Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: BalanceAssertion -> Rep BalanceAssertion x to :: Rep BalanceAssertion x -> BalanceAssertion | |||||
| Show BalanceAssertion Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> BalanceAssertion -> ShowS show :: BalanceAssertion -> String showList :: [BalanceAssertion] -> ShowS | |||||
| HasAmounts BalanceAssertion Source # | |||||
Defined in Hledger.Data.Posting Methods styleAmounts :: Map CommoditySymbol AmountStyle -> BalanceAssertion -> BalanceAssertion Source # | |||||
| type Rep BalanceAssertion Source # | |||||
Defined in Hledger.Data.Types type Rep BalanceAssertion = D1 ('MetaData "BalanceAssertion" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "BalanceAssertion" 'PrefixI 'True) ((S1 ('MetaSel ('Just "baamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Amount) :*: S1 ('MetaSel ('Just "batotal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "bainclusive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "baposition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos)))) | |||||
data BalanceData Source #
Data that's useful in "balance" reports: subaccount-exclusive and -inclusive amounts, typically representing either a balance change or an end balance; and a count of postings.
Constructors
| BalanceData | |
Fields
| |
Instances
| FromJSON BalanceData | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser BalanceData parseJSONList :: Value -> Parser [BalanceData] omittedField :: Maybe BalanceData | |||||
| ToJSON BalanceData | |||||
Defined in Hledger.Data.Json Methods toJSON :: BalanceData -> Value toEncoding :: BalanceData -> Encoding toJSONList :: [BalanceData] -> Value toEncodingList :: [BalanceData] -> Encoding omitField :: BalanceData -> Bool | |||||
| Monoid BalanceData | |||||
Defined in Hledger.Data.BalanceData | |||||
| Semigroup BalanceData | |||||
Defined in Hledger.Data.BalanceData Methods (<>) :: BalanceData -> BalanceData -> BalanceData sconcat :: NonEmpty BalanceData -> BalanceData stimes :: Integral b => b -> BalanceData -> BalanceData | |||||
| Eq BalanceData Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic BalanceData Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show BalanceData | |||||
Defined in Hledger.Data.BalanceData Methods showsPrec :: Int -> BalanceData -> ShowS show :: BalanceData -> String showList :: [BalanceData] -> ShowS | |||||
| HasAmounts BalanceData Source # | |||||
Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> BalanceData -> BalanceData Source # | |||||
| type Rep BalanceData Source # | |||||
Defined in Hledger.Data.Types type Rep BalanceData = D1 ('MetaData "BalanceData" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "BalanceData" 'PrefixI 'True) (S1 ('MetaSel ('Just "bdexcludingsubs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MixedAmount) :*: (S1 ('MetaSel ('Just "bdincludingsubs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MixedAmount) :*: S1 ('MetaSel ('Just "bdnumpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))) | |||||
Constructors
| Commodity | |
Fields
| |
Instances
| ToJSON Commodity | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Commodity -> Encoding toJSONList :: [Commodity] -> Value toEncodingList :: [Commodity] -> Encoding | |||||
| NFData Commodity Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Commodity Source # | |||||
| Generic Commodity Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Commodity Source # | |||||
| type Rep Commodity Source # | |||||
Defined in Hledger.Data.Types type Rep Commodity = D1 ('MetaData "Commodity" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Commodity" 'PrefixI 'True) ((S1 ('MetaSel ('Just "csymbol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommoditySymbol) :*: (S1 ('MetaSel ('Just "cformat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AmountStyle)) :*: S1 ('MetaSel ('Just "ccomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "ctags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]) :*: (S1 ('MetaSel ('Just "caliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Amount, SourcePos)]) :*: S1 ('MetaSel ('Just "csourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos))))) | |||||
type CommoditySymbol = Text Source #
The cost basis of an individual lot - some quantity of an asset acquired at a given date and time. This can represent a definite cost basis, which must have a cost and date; the label is optional. Or it can represent a cost basis matcher for selecting lots. Note: cost is always stored as a per-unit cost, even if the user specified total cost with {{}}.
Constructors
| CostBasis | |
Instances
| FromJSON CostBasis | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser CostBasis parseJSONList :: Value -> Parser [CostBasis] omittedField :: Maybe CostBasis | |||||
| ToJSON CostBasis | |||||
Defined in Hledger.Data.Json Methods toEncoding :: CostBasis -> Encoding toJSONList :: [CostBasis] -> Value toEncodingList :: [CostBasis] -> Encoding | |||||
| NFData CostBasis Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq CostBasis Source # | |||||
| Ord CostBasis Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic CostBasis Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show CostBasis Source # | |||||
| type Rep CostBasis Source # | |||||
Defined in Hledger.Data.Types type Rep CostBasis = D1 ('MetaData "CostBasis" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "CostBasis" 'PrefixI 'True) (S1 ('MetaSel ('Just "cbDate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Day)) :*: (S1 ('MetaSel ('Just "cbLabel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "cbCost") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Amount))))) | |||||
A possibly open-ended span of time, from an optional inclusive start date to an optional exclusive end date. Each date can be either exact or flexible. An "exact date span" is a Datepan with exact start and end dates.
Instances
| ToJSON DateSpan | |||||
Defined in Hledger.Data.Json Methods toEncoding :: DateSpan -> Encoding toJSONList :: [DateSpan] -> Value toEncodingList :: [DateSpan] -> Encoding | |||||
| Default DateSpan Source # | |||||
Defined in Hledger.Data.Types | |||||
| NFData DateSpan Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq DateSpan Source # | |||||
| Ord DateSpan Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic DateSpan Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show DateSpan | |||||
| type Rep DateSpan Source # | |||||
Defined in Hledger.Data.Types type Rep DateSpan = D1 ('MetaData "DateSpan" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "DateSpan" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EFDay)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EFDay)))) | |||||
type DecimalMark = Char Source #
One of the decimal marks we support: either period or comma.
Constructors
| DepthSpec | |
Fields
| |
data DigitGroupStyle Source #
A style for displaying digit groups in the integer part of a floating point number. It consists of the character used to separate groups (any of the digit group marks accepted when parsing: period, comma, underscore, apostrophe, or one of several unicode spaces; see isDigitSeparatorChar), and the size of each group, starting with the one nearest the decimal point. The last group size is assumed to repeat. Eg, comma between thousands is DigitGroups ',' [3].
Constructors
| DigitGroups !Char ![Word8] |
Instances
| FromJSON DigitGroupStyle | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser DigitGroupStyle parseJSONList :: Value -> Parser [DigitGroupStyle] omittedField :: Maybe DigitGroupStyle | |||||
| ToJSON DigitGroupStyle | |||||
Defined in Hledger.Data.Json Methods toJSON :: DigitGroupStyle -> Value toEncoding :: DigitGroupStyle -> Encoding toJSONList :: [DigitGroupStyle] -> Value toEncodingList :: [DigitGroupStyle] -> Encoding omitField :: DigitGroupStyle -> Bool | |||||
| NFData DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: DigitGroupStyle -> () | |||||
| Eq DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: DigitGroupStyle -> DigitGroupStyle -> Bool (/=) :: DigitGroupStyle -> DigitGroupStyle -> Bool | |||||
| Ord DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types Methods compare :: DigitGroupStyle -> DigitGroupStyle -> Ordering (<) :: DigitGroupStyle -> DigitGroupStyle -> Bool (<=) :: DigitGroupStyle -> DigitGroupStyle -> Bool (>) :: DigitGroupStyle -> DigitGroupStyle -> Bool (>=) :: DigitGroupStyle -> DigitGroupStyle -> Bool max :: DigitGroupStyle -> DigitGroupStyle -> DigitGroupStyle min :: DigitGroupStyle -> DigitGroupStyle -> DigitGroupStyle | |||||
| Generic DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: DigitGroupStyle -> Rep DigitGroupStyle x to :: Rep DigitGroupStyle x -> DigitGroupStyle | |||||
| Read DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS DigitGroupStyle readList :: ReadS [DigitGroupStyle] readPrec :: ReadPrec DigitGroupStyle readListPrec :: ReadPrec [DigitGroupStyle] | |||||
| Show DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> DigitGroupStyle -> ShowS show :: DigitGroupStyle -> String showList :: [DigitGroupStyle] -> ShowS | |||||
| type Rep DigitGroupStyle Source # | |||||
Defined in Hledger.Data.Types type Rep DigitGroupStyle = D1 ('MetaData "DigitGroupStyle" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "DigitGroups" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word8]))) | |||||
A date which is either exact or flexible. Flexible dates are allowed to be adjusted in certain situations.
Instances
| ToJSON EFDay | |||||
Defined in Hledger.Data.Json Methods toEncoding :: EFDay -> Encoding toJSONList :: [EFDay] -> Value toEncodingList :: [EFDay] -> Encoding | |||||
| NFData EFDay Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq EFDay Source # | |||||
| Ord EFDay Source # | |||||
| Generic EFDay Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show EFDay Source # | |||||
| type Rep EFDay Source # | |||||
Defined in Hledger.Data.Types type Rep EFDay = D1 ('MetaData "EFDay" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Exact" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day)) :+: C1 ('MetaCons "Flex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day))) | |||||
data FastPathStats Source #
Counts of the journal entries which the journal parser's fast path (see Hledger.Read.JournalReader) accepted or declined, and the reasons for declining. Collected only with --debug, and reported after parsing.
Constructors
| FastPathStats | |
Fields
| |
Instances
| NFData FastPathStats Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: FastPathStats -> () | |||||
| Monoid FastPathStats Source # | |||||
Defined in Hledger.Data.Types Methods mappend :: FastPathStats -> FastPathStats -> FastPathStats mconcat :: [FastPathStats] -> FastPathStats | |||||
| Semigroup FastPathStats Source # | |||||
Defined in Hledger.Data.Types Methods (<>) :: FastPathStats -> FastPathStats -> FastPathStats sconcat :: NonEmpty FastPathStats -> FastPathStats stimes :: Integral b => b -> FastPathStats -> FastPathStats | |||||
| Eq FastPathStats Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic FastPathStats Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show FastPathStats Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> FastPathStats -> ShowS show :: FastPathStats -> String showList :: [FastPathStats] -> ShowS | |||||
| type Rep FastPathStats Source # | |||||
Defined in Hledger.Data.Types type Rep FastPathStats = D1 ('MetaData "FastPathStats" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "FastPathStats" 'PrefixI 'True) ((S1 ('MetaSel ('Just "fpsTxnsFast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "fpsTxnsGeneral") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "fpsPricesFast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "fpsPricesGeneral") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "fpsDeclines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Text Int)))))) | |||||
class HasAmounts a where Source #
Types with this class have one or more amounts, which can have display styles applied to them.
Methods
styleAmounts :: Map CommoditySymbol AmountStyle -> a -> a Source #
Instances
Constructors
| NoInterval | |
| Days Int | |
| Weeks Int | |
| Months Int | |
| Quarters Int | |
| Years Int | |
| NthWeekdayOfMonth Int Int | |
| MonthDay Int | |
| MonthAndDay Int Int | |
| DaysOfWeek [Int] |
Instances
| ToJSON Interval | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Interval -> Encoding toJSONList :: [Interval] -> Value toEncodingList :: [Interval] -> Encoding | |||||
| Default Interval Source # | |||||
Defined in Hledger.Data.Types | |||||
| NFData Interval Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Interval Source # | |||||
| Ord Interval Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic Interval Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Interval Source # | |||||
| type Rep Interval Source # | |||||
Defined in Hledger.Data.Types type Rep Interval = D1 ('MetaData "Interval" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (((C1 ('MetaCons "NoInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Days" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "Weeks" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "Months" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "Quarters" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))) :+: ((C1 ('MetaCons "Years" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "NthWeekdayOfMonth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "MonthDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "MonthAndDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "DaysOfWeek" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Int])))))) | |||||
A journal, containing general ledger transactions; also directives and various other things. This is hledger's main data model.
During parsing, it is used as the type alias ParsedJournal. The jparse* fields are mainly used during parsing and included here for convenience. The list fields described as "in parse order" are usually reversed for efficiency during parsing. After parsing, "journalFinalise" converts ParsedJournal to a finalised Journal, which has all lists correctly ordered, and much data inference and validation applied.
Constructors
| Journal | |
Fields
| |
Instances
| ToJSON Journal | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Journal -> Encoding toJSONList :: [Journal] -> Value toEncodingList :: [Journal] -> Encoding | |||||
| Default Journal | |||||
Defined in Hledger.Data.Journal | |||||
| NFData Journal Source # | |||||
Defined in Hledger.Data.Types | |||||
| Semigroup Journal | |||||
| Eq Journal Source # | |||||
| Generic Journal Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Journal | |||||
| type Rep Journal Source # | |||||
Defined in Hledger.Data.Types type Rep Journal = D1 ('MetaData "Journal" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Journal" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "jparsedefaultyear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Year)) :*: S1 ('MetaSel ('Just "jparseapplyyears") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Maybe Year])) :*: (S1 ('MetaSel ('Just "jparsedefaultcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (CommoditySymbol, AmountStyle))) :*: S1 ('MetaSel ('Just "jparsedecimalmark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DecimalMark)))) :*: ((S1 ('MetaSel ('Just "jparseparentaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [AccountName]) :*: S1 ('MetaSel ('Just "jparsealiases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [AccountAlias])) :*: (S1 ('MetaSel ('Just "jparseoptaliases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [AccountAlias]) :*: S1 ('MetaSel ('Just "jparsetimeclockentries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TimeclockEntry])))) :*: (((S1 ('MetaSel ('Just "jparseincludefilestack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(FilePath, FilePath)]) :*: S1 ('MetaSel ('Just "jparsepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ParsePos))) :*: (S1 ('MetaSel ('Just "jparseamountstyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set AmountStyle)) :*: S1 ('MetaSel ('Just "jparsetexts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Text)))) :*: ((S1 ('MetaSel ('Just "jparsefastpathstats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FastPathStats) :*: S1 ('MetaSel ('Just "jdeclaredpayees") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Payee, PayeeDeclarationInfo)])) :*: (S1 ('MetaSel ('Just "jdeclaredtags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(TagName, TagDeclarationInfo)]) :*: S1 ('MetaSel ('Just "jdeclaredaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(AccountName, AccountDeclarationInfo)]))))) :*: ((((S1 ('MetaSel ('Just "jdeclaredaccounttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map AccountName [Tag])) :*: S1 ('MetaSel ('Just "jdeclaredaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map AccountType [AccountName]))) :*: (S1 ('MetaSel ('Just "jaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map AccountName AccountType)) :*: S1 ('MetaSel ('Just "jdeclaredcommodities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map CommoditySymbol Commodity)))) :*: ((S1 ('MetaSel ('Just "jdeclaredcommoditytags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map CommoditySymbol [Tag])) :*: S1 ('MetaSel ('Just "jinferredcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map CommoditySymbol AmountStyle))) :*: (S1 ('MetaSel ('Just "jglobalcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map CommoditySymbol AmountStyle)) :*: S1 ('MetaSel ('Just "jpricedirectives") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [PriceDirective])))) :*: (((S1 ('MetaSel ('Just "jinferredmarketprices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [MarketPrice]) :*: S1 ('MetaSel ('Just "jtxnmodifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TransactionModifier])) :*: (S1 ('MetaSel ('Just "jperiodictxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [PeriodicTransaction]) :*: S1 ('MetaSel ('Just "jasserts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [AssertDirective]))) :*: ((S1 ('MetaSel ('Just "jtxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Transaction]) :*: S1 ('MetaSel ('Just "jitems") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [JournalItem])) :*: (S1 ('MetaSel ('Just "jfiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [JournalFile]) :*: (S1 ('MetaSel ('Just "jauxfiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(FilePath, [FilePath])]) :*: S1 ('MetaSel ('Just "jlastreadtime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 POSIXTime)))))))) | |||||
data JournalFile Source #
One of the files a journal was read from.
Constructors
| JournalFile | |
Instances
| ToJSON JournalFile | |||||
Defined in Hledger.Data.Json Methods toJSON :: JournalFile -> Value toEncoding :: JournalFile -> Encoding toJSONList :: [JournalFile] -> Value toEncodingList :: [JournalFile] -> Encoding omitField :: JournalFile -> Bool | |||||
| NFData JournalFile Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: JournalFile -> () | |||||
| Eq JournalFile Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic JournalFile Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show JournalFile Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> JournalFile -> ShowS show :: JournalFile -> String showList :: [JournalFile] -> ShowS | |||||
| type Rep JournalFile Source # | |||||
Defined in Hledger.Data.Types type Rep JournalFile = D1 ('MetaData "JournalFile" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "JournalFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "jfpath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "jftext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "jfdepth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))) | |||||
data JournalItem Source #
One top-level item of a journal file, recorded in file order so that the file can be reproduced (by print --export). Transactions are represented by a placeholder; the transaction itself is in jtxns. Text fields hold verbatim source text, including the trailing newline. Blank lines are recorded only as separators (one JIBlank for each run of them), since print --export normalises blank lines. Fields are strict so that recording items doesn't retain parse-time thunks.
Constructors
| JITransaction !SourcePos | a transaction: the one in jtxns whose tsourcepos starts here |
| JIComment !Text | a single top-level comment line (starting with ; # or *) |
| JICommentBlock !Text | a comment ... end comment block |
| JIDirective !Text | a directive which should be reproduced when exporting (including P, ~ and = rules), without any ! or @ prefix |
| JINonExportedDirective !Text | a directive which should not be reproduced when exporting: apply account, alias and their end forms, whose effect is already applied to the data; and the Ledger directives hledger ignores |
| JIInclude !Text | an include directive line; the included file's items follow it |
| JIBlank | one or more blank lines |
Instances
| NFData JournalItem Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: JournalItem -> () | |||||
| Eq JournalItem Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic JournalItem Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show JournalItem Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> JournalItem -> ShowS show :: JournalItem -> String showList :: [JournalItem] -> ShowS | |||||
| type Rep JournalItem Source # | |||||
Defined in Hledger.Data.Types type Rep JournalItem = D1 ('MetaData "JournalItem" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) ((C1 ('MetaCons "JITransaction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourcePos)) :+: (C1 ('MetaCons "JIComment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "JICommentBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :+: ((C1 ('MetaCons "JIDirective" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "JINonExportedDirective" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "JIInclude" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "JIBlank" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
A Ledger has the journal it derives from, and the accounts derived from that. Accounts are accessible both list-wise and tree-wise, since each one knows its parent and subs; the first account is the root of the tree and always exists.
Instances
| ToJSON Ledger | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Ledger -> Encoding toJSONList :: [Ledger] -> Value toEncodingList :: [Ledger] -> Encoding | |||||
| Generic Ledger Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Ledger | |||||
| type Rep Ledger Source # | |||||
Defined in Hledger.Data.Types type Rep Ledger = D1 ('MetaData "Ledger" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Ledger" 'PrefixI 'True) (S1 ('MetaSel ('Just "ljournal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Journal) :*: S1 ('MetaSel ('Just "laccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Account BalanceData]))) | |||||
Identifies a specific lot of a commodity, by its acquisition date and optional label. Ordered by date first, then label (Nothing sorts before Just).
Instances
| NFData LotId Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq LotId Source # | |||||
| Ord LotId Source # | |||||
| Generic LotId Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show LotId Source # | |||||
| type Rep LotId Source # | |||||
Defined in Hledger.Data.Types type Rep LotId = D1 ('MetaData "LotId" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "LotId" 'PrefixI 'True) (S1 ('MetaSel ('Just "lotDate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Day) :*: S1 ('MetaSel ('Just "lotLabel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)))) | |||||
data MarketPrice Source #
A historical market price (exchange rate) from one commodity to another. A more concise form of a PriceDirective, without the amount display info.
Constructors
| MarketPrice | |
Fields
| |
Instances
| FromJSON MarketPrice | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser MarketPrice parseJSONList :: Value -> Parser [MarketPrice] omittedField :: Maybe MarketPrice | |||||
| ToJSON MarketPrice | |||||
Defined in Hledger.Data.Json Methods toJSON :: MarketPrice -> Value toEncoding :: MarketPrice -> Encoding toJSONList :: [MarketPrice] -> Value toEncodingList :: [MarketPrice] -> Encoding omitField :: MarketPrice -> Bool | |||||
| NFData MarketPrice Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: MarketPrice -> () | |||||
| Eq MarketPrice Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord MarketPrice Source # | |||||
Defined in Hledger.Data.Types Methods compare :: MarketPrice -> MarketPrice -> Ordering (<) :: MarketPrice -> MarketPrice -> Bool (<=) :: MarketPrice -> MarketPrice -> Bool (>) :: MarketPrice -> MarketPrice -> Bool (>=) :: MarketPrice -> MarketPrice -> Bool max :: MarketPrice -> MarketPrice -> MarketPrice min :: MarketPrice -> MarketPrice -> MarketPrice | |||||
| Generic MarketPrice Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show MarketPrice Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> MarketPrice -> ShowS show :: MarketPrice -> String showList :: [MarketPrice] -> ShowS | |||||
| type Rep MarketPrice Source # | |||||
Defined in Hledger.Data.Types type Rep MarketPrice = D1 ('MetaData "MarketPrice" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "MarketPrice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mpdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day) :*: S1 ('MetaSel ('Just "mpfrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommoditySymbol)) :*: (S1 ('MetaSel ('Just "mpto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "mprate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Quantity)))) | |||||
newtype MixedAmount Source #
hledger's most general amount type. It can contain multiple single-commodity Amounts, each possibly with a transacted cost and/or a lot cost basis attached. Internally it is a map from MixedAmountKey to Amount, for efficiency and so that every mixed amount has a single canonical form.
Constructors
| Mixed (Map MixedAmountKey Amount) |
Instances
data MixedAmountKey Source #
The key used to group amounts within a MixedAmount: commodity and an optional unit or total transacted cost. Amounts with the same commodity and transacted cost are combined; different transacted costs are kept separate. (Lot cost basis is not part of the key, so not kept separate; subaccounts are used for that.)
Constructors
| MixedAmountKeyNoCost !CommoditySymbol | amount commodity |
| MixedAmountKeyUnitCost | |
Fields
| |
| MixedAmountKeyTotalCost | |
Fields
| |
Instances
| NFData MixedAmountKey Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: MixedAmountKey -> () | |||||
| Eq MixedAmountKey Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: MixedAmountKey -> MixedAmountKey -> Bool (/=) :: MixedAmountKey -> MixedAmountKey -> Bool | |||||
| Ord MixedAmountKey Source # | Sort by commodity, then cost commodity (no cost first), then cost type and quantity. | ||||
Defined in Hledger.Data.Types Methods compare :: MixedAmountKey -> MixedAmountKey -> Ordering (<) :: MixedAmountKey -> MixedAmountKey -> Bool (<=) :: MixedAmountKey -> MixedAmountKey -> Bool (>) :: MixedAmountKey -> MixedAmountKey -> Bool (>=) :: MixedAmountKey -> MixedAmountKey -> Bool max :: MixedAmountKey -> MixedAmountKey -> MixedAmountKey min :: MixedAmountKey -> MixedAmountKey -> MixedAmountKey | |||||
| Generic MixedAmountKey Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show MixedAmountKey Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> MixedAmountKey -> ShowS show :: MixedAmountKey -> String showList :: [MixedAmountKey] -> ShowS | |||||
| type Rep MixedAmountKey Source # | |||||
Defined in Hledger.Data.Types type Rep MixedAmountKey = D1 ('MetaData "MixedAmountKey" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "MixedAmountKeyNoCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol)) :+: (C1 ('MetaCons "MixedAmountKeyUnitCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity))) :+: C1 ('MetaCons "MixedAmountKeyTotalCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol)))) | |||||
data NormalSign Source #
Whether an account's balance is normally a positive number (in accounting terms, a debit balance) or a negative number (credit balance). Assets and expenses are normally positive (debit), while liabilities, equity and income are normally negative (credit). https://en.wikipedia.org/wiki/Normal_balance
Constructors
| NormallyPositive | |
| NormallyNegative |
Instances
| Eq NormalSign Source # | |
Defined in Hledger.Data.Types | |
| Show NormalSign Source # | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> NormalSign -> ShowS show :: NormalSign -> String showList :: [NormalSign] -> ShowS | |
A source position calculated during parsing, with the parser's offset and remaining input at that point. Kept in the parse state, so that later positions can be calculated cheaply from it (see Hledger.Read.Common.getSourcePos').
Constructors
| ParsePos | |
Fields
| |
Instances
| NFData ParsePos Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq ParsePos Source # | |||||
| Generic ParsePos Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show ParsePos Source # | |||||
| type Rep ParsePos Source # | |||||
Defined in Hledger.Data.Types type Rep ParsePos = D1 ('MetaData "ParsePos" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "ParsePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "ppSourcePos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "ppOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "ppInput") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))) | |||||
type ParsedJournal = Journal Source #
A journal in the process of being parsed, not yet finalised. The data is partial, and list fields are in reverse order.
data PayeeDeclarationInfo Source #
Extra information found in a payee directive.
Constructors
| PayeeDeclarationInfo | |
Fields
| |
Instances
| ToJSON PayeeDeclarationInfo | |||||
Defined in Hledger.Data.Json Methods toJSON :: PayeeDeclarationInfo -> Value toEncoding :: PayeeDeclarationInfo -> Encoding toJSONList :: [PayeeDeclarationInfo] -> Value toEncodingList :: [PayeeDeclarationInfo] -> Encoding omitField :: PayeeDeclarationInfo -> Bool | |||||
| NFData PayeeDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: PayeeDeclarationInfo -> () | |||||
| Eq PayeeDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: PayeeDeclarationInfo -> PayeeDeclarationInfo -> Bool (/=) :: PayeeDeclarationInfo -> PayeeDeclarationInfo -> Bool | |||||
| Generic PayeeDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: PayeeDeclarationInfo -> Rep PayeeDeclarationInfo x to :: Rep PayeeDeclarationInfo x -> PayeeDeclarationInfo | |||||
| Show PayeeDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> PayeeDeclarationInfo -> ShowS show :: PayeeDeclarationInfo -> String showList :: [PayeeDeclarationInfo] -> ShowS | |||||
| type Rep PayeeDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types type Rep PayeeDeclarationInfo = D1 ('MetaData "PayeeDeclarationInfo" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "PayeeDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "pdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "pditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]))) | |||||
Constructors
| DayPeriod Day | |
| WeekPeriod Day | |
| MonthPeriod Year Month | |
| QuarterPeriod Year Quarter | |
| YearPeriod Year | |
| PeriodBetween Day Day | |
| PeriodFrom Day | |
| PeriodTo Day | |
| PeriodAll |
Instances
| ToJSON Period | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Period -> Encoding toJSONList :: [Period] -> Value toEncodingList :: [Period] -> Encoding | |||||
| Default Period Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Period Source # | |||||
| Ord Period Source # | |||||
| Generic Period Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Period Source # | |||||
| HasAmounts PostingsReportItem Source # | |||||
Defined in Hledger.Reports.PostingsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem Source # | |||||
| type Rep Period Source # | |||||
Defined in Hledger.Data.Types type Rep Period = D1 ('MetaData "Period" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (((C1 ('MetaCons "DayPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day)) :+: C1 ('MetaCons "WeekPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day))) :+: (C1 ('MetaCons "MonthPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Month)) :+: C1 ('MetaCons "QuarterPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Quarter)))) :+: ((C1 ('MetaCons "YearPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Year)) :+: C1 ('MetaCons "PeriodBetween" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day))) :+: (C1 ('MetaCons "PeriodFrom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day)) :+: (C1 ('MetaCons "PeriodTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day)) :+: C1 ('MetaCons "PeriodAll" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||
data PeriodData a Source #
A general container for storing data values associated with zero or more contiguous report (sub)periods, and with the (open ended) pre-report period. The report periods are typically all the same length, but need not be.
Report periods are represented only by their start dates, used as the keys of a Map.
Constructors
| PeriodData | |
Instances
| Foldable1 PeriodData | |||||
Defined in Hledger.Data.PeriodData Methods fold1 :: Semigroup m => PeriodData m -> m foldMap1 :: Semigroup m => (a -> m) -> PeriodData a -> m foldMap1' :: Semigroup m => (a -> m) -> PeriodData a -> m toNonEmpty :: PeriodData a -> NonEmpty a maximum :: Ord a => PeriodData a -> a minimum :: Ord a => PeriodData a -> a head :: PeriodData a -> a last :: PeriodData a -> a foldrMap1 :: (a -> b) -> (a -> b -> b) -> PeriodData a -> b foldlMap1' :: (a -> b) -> (b -> a -> b) -> PeriodData a -> b foldlMap1 :: (a -> b) -> (b -> a -> b) -> PeriodData a -> b foldrMap1' :: (a -> b) -> (a -> b -> b) -> PeriodData a -> b | |||||
| Functor PeriodData Source # | |||||
Defined in Hledger.Data.Types | |||||
| Foldable PeriodData | |||||
Defined in Hledger.Data.PeriodData Methods fold :: Monoid m => PeriodData m -> m foldMap :: Monoid m => (a -> m) -> PeriodData a -> m foldMap' :: Monoid m => (a -> m) -> PeriodData a -> m foldr :: (a -> b -> b) -> b -> PeriodData a -> b foldr' :: (a -> b -> b) -> b -> PeriodData a -> b foldl :: (b -> a -> b) -> b -> PeriodData a -> b foldl' :: (b -> a -> b) -> b -> PeriodData a -> b foldr1 :: (a -> a -> a) -> PeriodData a -> a foldl1 :: (a -> a -> a) -> PeriodData a -> a toList :: PeriodData a -> [a] null :: PeriodData a -> Bool length :: PeriodData a -> Int elem :: Eq a => a -> PeriodData a -> Bool maximum :: Ord a => PeriodData a -> a minimum :: Ord a => PeriodData a -> a sum :: Num a => PeriodData a -> a product :: Num a => PeriodData a -> a | |||||
| Traversable PeriodData | |||||
Defined in Hledger.Data.PeriodData Methods traverse :: Applicative f => (a -> f b) -> PeriodData a -> f (PeriodData b) sequenceA :: Applicative f => PeriodData (f a) -> f (PeriodData a) mapM :: Monad m => (a -> m b) -> PeriodData a -> m (PeriodData b) sequence :: Monad m => PeriodData (m a) -> m (PeriodData a) | |||||
| FromJSON a => FromJSON (PeriodData a) | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser (PeriodData a) parseJSONList :: Value -> Parser [PeriodData a] omittedField :: Maybe (PeriodData a) | |||||
| ToJSON a => ToJSON (PeriodData a) | |||||
Defined in Hledger.Data.Json Methods toJSON :: PeriodData a -> Value toEncoding :: PeriodData a -> Encoding toJSONList :: [PeriodData a] -> Value toEncodingList :: [PeriodData a] -> Encoding omitField :: PeriodData a -> Bool | |||||
| Monoid a => Monoid (PeriodData a) | |||||
Defined in Hledger.Data.PeriodData Methods mempty :: PeriodData a mappend :: PeriodData a -> PeriodData a -> PeriodData a mconcat :: [PeriodData a] -> PeriodData a | |||||
| Semigroup a => Semigroup (PeriodData a) | The Semigroup instance for | ||||
Defined in Hledger.Data.PeriodData Methods (<>) :: PeriodData a -> PeriodData a -> PeriodData a sconcat :: NonEmpty (PeriodData a) -> PeriodData a stimes :: Integral b => b -> PeriodData a -> PeriodData a | |||||
| Eq a => Eq (PeriodData a) Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord a => Ord (PeriodData a) Source # | |||||
Defined in Hledger.Data.Types Methods compare :: PeriodData a -> PeriodData a -> Ordering (<) :: PeriodData a -> PeriodData a -> Bool (<=) :: PeriodData a -> PeriodData a -> Bool (>) :: PeriodData a -> PeriodData a -> Bool (>=) :: PeriodData a -> PeriodData a -> Bool max :: PeriodData a -> PeriodData a -> PeriodData a min :: PeriodData a -> PeriodData a -> PeriodData a | |||||
| Generic (PeriodData a) Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show a => Show (PeriodData a) | |||||
Defined in Hledger.Data.PeriodData Methods showsPrec :: Int -> PeriodData a -> ShowS show :: PeriodData a -> String showList :: [PeriodData a] -> ShowS | |||||
| HasAmounts a => HasAmounts (PeriodData a) Source # | |||||
Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PeriodData a -> PeriodData a Source # | |||||
| type Rep (PeriodData a) Source # | |||||
Defined in Hledger.Data.Types type Rep (PeriodData a) = D1 ('MetaData "PeriodData" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "PeriodData" 'PrefixI 'True) (S1 ('MetaSel ('Just "pdpre") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "pdperiods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Day a)))) | |||||
data PeriodicTransaction Source #
A periodic transaction rule, describing a transaction that recurs.
Constructors
| PeriodicTransaction | |
Fields
| |
Instances
| ToJSON PeriodicTransaction | |||||
Defined in Hledger.Data.Json Methods toJSON :: PeriodicTransaction -> Value toEncoding :: PeriodicTransaction -> Encoding toJSONList :: [PeriodicTransaction] -> Value toEncodingList :: [PeriodicTransaction] -> Encoding omitField :: PeriodicTransaction -> Bool | |||||
| NFData PeriodicTransaction Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: PeriodicTransaction -> () | |||||
| Eq PeriodicTransaction Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: PeriodicTransaction -> PeriodicTransaction -> Bool (/=) :: PeriodicTransaction -> PeriodicTransaction -> Bool | |||||
| Generic PeriodicTransaction Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: PeriodicTransaction -> Rep PeriodicTransaction x to :: Rep PeriodicTransaction x -> PeriodicTransaction | |||||
| Show PeriodicTransaction | |||||
Defined in Hledger.Data.PeriodicTransaction Methods showsPrec :: Int -> PeriodicTransaction -> ShowS show :: PeriodicTransaction -> String showList :: [PeriodicTransaction] -> ShowS | |||||
| type Rep PeriodicTransaction Source # | |||||
Defined in Hledger.Data.Types type Rep PeriodicTransaction = D1 ('MetaData "PeriodicTransaction" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "PeriodicTransaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "ptperiodexpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptinterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Interval)) :*: (S1 ('MetaSel ('Just "ptspan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DateSpan) :*: (S1 ('MetaSel ('Just "ptsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (SourcePos, SourcePos)) :*: S1 ('MetaSel ('Just "ptstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Status)))) :*: ((S1 ('MetaSel ('Just "ptcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "ptcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "pttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "ptpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Posting])))))) | |||||
Constructors
| Posting | |
Fields
| |
Instances
| FromJSON Posting | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Posting parseJSONList :: Value -> Parser [Posting] omittedField :: Maybe Posting | |||||
| ToJSON Posting | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Posting -> Encoding toJSONList :: [Posting] -> Value toEncodingList :: [Posting] -> Encoding | |||||
| NFData Posting Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Posting Source # | |||||
| Generic Posting Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Posting Source # | Posting's show instance elides the parent transaction so as not to recurse forever. | ||||
| HasAmounts Posting Source # | |||||
Defined in Hledger.Data.Posting Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Posting -> Posting Source # | |||||
| HasAmounts PostingsReportItem Source # | |||||
Defined in Hledger.Reports.PostingsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem Source # | |||||
| type Rep Posting Source # | |||||
Defined in Hledger.Data.Types type Rep Posting = D1 ('MetaData "Posting" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Posting" 'PrefixI 'True) (((S1 ('MetaSel ('Just "pdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Day)) :*: S1 ('MetaSel ('Just "pdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Day))) :*: (S1 ('MetaSel ('Just "pstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Status) :*: (S1 ('MetaSel ('Just "paccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "pamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MixedAmount)))) :*: ((S1 ('MetaSel ('Just "pcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "preal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PostingRealness) :*: S1 ('MetaSel ('Just "ptags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]))) :*: (S1 ('MetaSel ('Just "pbalanceassertion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BalanceAssertion)) :*: (S1 ('MetaSel ('Just "ptransaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Transaction)) :*: S1 ('MetaSel ('Just "poriginal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Posting))))))) | |||||
data PostingRealness Source #
Constructors
| RealPosting | |
| VirtualPosting | |
| BalancedVirtualPosting |
Instances
| FromJSON PostingRealness | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser PostingRealness parseJSONList :: Value -> Parser [PostingRealness] omittedField :: Maybe PostingRealness | |||||
| ToJSON PostingRealness | |||||
Defined in Hledger.Data.Json Methods toJSON :: PostingRealness -> Value toEncoding :: PostingRealness -> Encoding toJSONList :: [PostingRealness] -> Value toEncodingList :: [PostingRealness] -> Encoding omitField :: PostingRealness -> Bool | |||||
| NFData PostingRealness Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: PostingRealness -> () | |||||
| Eq PostingRealness Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: PostingRealness -> PostingRealness -> Bool (/=) :: PostingRealness -> PostingRealness -> Bool | |||||
| Generic PostingRealness Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: PostingRealness -> Rep PostingRealness x to :: Rep PostingRealness x -> PostingRealness | |||||
| Show PostingRealness Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> PostingRealness -> ShowS show :: PostingRealness -> String showList :: [PostingRealness] -> ShowS | |||||
| type Rep PostingRealness Source # | |||||
Defined in Hledger.Data.Types type Rep PostingRealness = D1 ('MetaData "PostingRealness" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "RealPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BalancedVirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data PriceDirective Source #
A market price declaration made by the journal format's P directive. It declares two things: a historical exchange rate between two commodities, and an amount display style for the second commodity.
Constructors
| PriceDirective | |
Fields
| |
Instances
| ToJSON PriceDirective | |||||
Defined in Hledger.Data.Json Methods toJSON :: PriceDirective -> Value toEncoding :: PriceDirective -> Encoding toJSONList :: [PriceDirective] -> Value toEncodingList :: [PriceDirective] -> Encoding omitField :: PriceDirective -> Bool | |||||
| NFData PriceDirective Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: PriceDirective -> () | |||||
| Eq PriceDirective Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: PriceDirective -> PriceDirective -> Bool (/=) :: PriceDirective -> PriceDirective -> Bool | |||||
| Ord PriceDirective Source # | |||||
Defined in Hledger.Data.Types Methods compare :: PriceDirective -> PriceDirective -> Ordering (<) :: PriceDirective -> PriceDirective -> Bool (<=) :: PriceDirective -> PriceDirective -> Bool (>) :: PriceDirective -> PriceDirective -> Bool (>=) :: PriceDirective -> PriceDirective -> Bool max :: PriceDirective -> PriceDirective -> PriceDirective min :: PriceDirective -> PriceDirective -> PriceDirective | |||||
| Generic PriceDirective Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show PriceDirective Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> PriceDirective -> ShowS show :: PriceDirective -> String showList :: [PriceDirective] -> ShowS | |||||
| type Rep PriceDirective Source # | |||||
Defined in Hledger.Data.Types type Rep PriceDirective = D1 ('MetaData "PriceDirective" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "PriceDirective" 'PrefixI 'True) ((S1 ('MetaSel ('Just "pdsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "pddate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day)) :*: (S1 ('MetaSel ('Just "pdcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "pdamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Amount)))) | |||||
data ReductionMethod Source #
The method used to select lots for disposal or transfer. Per-account methods (scoped to the posting's account): FIFOLIFO select oldestnewest first. HIFO selects highest cost first. AVERAGE uses weighted average cost basis for disposals (FIFO consumption order). SPECID requires every disposal/transfer to have an explicit lot selector matching exactly one lot. Global validation methods (*ALL variants): FIFOALLLIFOALLHIFOALL select per-account but validate that the selected lots would also be chosen first if all accounts' lots were considered together. Errors if not. AVERAGEALL additionally computes weighted average cost across the global pool.
Instances
| NFData ReductionMethod Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: ReductionMethod -> () | |||||
| Eq ReductionMethod Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: ReductionMethod -> ReductionMethod -> Bool (/=) :: ReductionMethod -> ReductionMethod -> Bool | |||||
| Ord ReductionMethod Source # | |||||
Defined in Hledger.Data.Types Methods compare :: ReductionMethod -> ReductionMethod -> Ordering (<) :: ReductionMethod -> ReductionMethod -> Bool (<=) :: ReductionMethod -> ReductionMethod -> Bool (>) :: ReductionMethod -> ReductionMethod -> Bool (>=) :: ReductionMethod -> ReductionMethod -> Bool max :: ReductionMethod -> ReductionMethod -> ReductionMethod min :: ReductionMethod -> ReductionMethod -> ReductionMethod | |||||
| Generic ReductionMethod Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: ReductionMethod -> Rep ReductionMethod x to :: Rep ReductionMethod x -> ReductionMethod | |||||
| Read ReductionMethod Source # | |||||
Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS ReductionMethod readList :: ReadS [ReductionMethod] readPrec :: ReadPrec ReductionMethod readListPrec :: ReadPrec [ReductionMethod] | |||||
| Show ReductionMethod Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> ReductionMethod -> ShowS show :: ReductionMethod -> String showList :: [ReductionMethod] -> ShowS | |||||
| type Rep ReductionMethod Source # | |||||
Defined in Hledger.Data.Types type Rep ReductionMethod = D1 ('MetaData "ReductionMethod" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (((C1 ('MetaCons "FIFO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LIFO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HIFO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AVERAGE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SPECID" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FIFOALL" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LIFOALL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HIFOALL" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AVERAGEALL" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||
"Rounding strategy" - how to apply an AmountStyle's display precision to a posting amount (and its cost, if any). Mainly used to customise print's output, with --round=none|soft|hard|all.
Constructors
| NoRounding | keep display precisions unchanged in amt and cost |
| SoftRounding | do soft rounding of amt and cost amounts (show more or fewer decimal zeros to approximate the target precision, but don't hide significant digits) |
| HardRounding | do hard rounding of amt (use the exact target precision, possibly hiding significant digits), and soft rounding of cost |
| AllRounding | do hard rounding of amt and cost |
Instances
| FromJSON Rounding | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Rounding parseJSONList :: Value -> Parser [Rounding] omittedField :: Maybe Rounding | |||||
| ToJSON Rounding | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Rounding -> Encoding toJSONList :: [Rounding] -> Value toEncodingList :: [Rounding] -> Encoding | |||||
| NFData Rounding Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Rounding Source # | |||||
| Ord Rounding Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic Rounding Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Read Rounding Source # | |||||
Defined in Hledger.Data.Types | |||||
| Show Rounding Source # | |||||
| type Rep Rounding Source # | |||||
Defined in Hledger.Data.Types type Rep Rounding = D1 ('MetaData "Rounding" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) ((C1 ('MetaCons "NoRounding" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SoftRounding" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HardRounding" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AllRounding" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
One of the standard *-separated value file types known by hledger,
Instances
| FromJSON Side | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Side parseJSONList :: Value -> Parser [Side] omittedField :: Maybe Side | |||||
| ToJSON Side | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Side -> Encoding toJSONList :: [Side] -> Value toEncodingList :: [Side] -> Encoding | |||||
| NFData Side Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Side Source # | |||||
| Ord Side Source # | |||||
| Generic Side Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Read Side Source # | |||||
Defined in Hledger.Data.Types | |||||
| Show Side Source # | |||||
| type Rep Side Source # | |||||
Defined in Hledger.Data.Types type Rep Side = D1 ('MetaData "Side" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
A possibly incomplete year-month-day date provided by the user, to be
interpreted as either a date or a date span depending on context. Missing
parts "on the left" will be filled from the provided reference date, e.g. if
the year and month are missing, the reference date's year and month are used.
Missing parts "on the right" are assumed, when interpreting as a date, to be
1, (e.g. if the year and month are present but the day is missing, it means
first day of that month); or when interpreting as a date span, to be a
wildcard (so it would mean all days of that month). See the smartdate
parser for more examples.
Or, one of the standard periods and a numeric offset relative to the reference date: (last|this|next) (day|week|month|quarter|year), where "this" means the period containing the reference date.
Or, (last|this|next) weekdayname, where "this" "next".
Or, (last|this|next) monthname, where "this" means the previous 1st if in that month, otherwise the start of the next occurrence of that month.
Constructors
| SmartCompleteDate Day | |
| SmartAssumeStart Year (Maybe Month) | |
| SmartFromReference (Maybe Month) MonthDay | |
| SmartMonth Month | |
| SmartRelative Integer SmartInterval | |
| SmartRelativeMonth Ordering Month | EQ will be treated like GT |
| SmartRelativeWeekDay Ordering WeekDay |
data SmartInterval Source #
Instances
| Show SmartInterval Source # | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> SmartInterval -> ShowS show :: SmartInterval -> String showList :: [SmartInterval] -> ShowS | |
The status of a transaction or posting, recorded with a status mark (nothing, !, or *). What these mean is ultimately user defined.
Instances
| FromJSON Status | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Status parseJSONList :: Value -> Parser [Status] omittedField :: Maybe Status | |||||
| ToJSON Status | |||||
Defined in Hledger.Data.Json Methods toEncoding :: Status -> Encoding toJSONList :: [Status] -> Value toEncodingList :: [Status] -> Encoding | |||||
| NFData Status Source # | |||||
Defined in Hledger.Data.Types | |||||
| Eq Status Source # | |||||
| Ord Status Source # | |||||
| Bounded Status Source # | |||||
Defined in Hledger.Data.Types | |||||
| Enum Status Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic Status Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Status Source # | |||||
| type Rep Status Source # | |||||
Defined in Hledger.Data.Types type Rep Status = D1 ('MetaData "Status" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Unmarked" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Pending" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cleared" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data StorageFormat Source #
The id of a data format understood by hledger, eg journal or csv.
The --output-format option selects one of these for output.
Instances
| Eq StorageFormat Source # | |
Defined in Hledger.Data.Types | |
| Ord StorageFormat Source # | |
Defined in Hledger.Data.Types Methods compare :: StorageFormat -> StorageFormat -> Ordering (<) :: StorageFormat -> StorageFormat -> Bool (<=) :: StorageFormat -> StorageFormat -> Bool (>) :: StorageFormat -> StorageFormat -> Bool (>=) :: StorageFormat -> StorageFormat -> Bool max :: StorageFormat -> StorageFormat -> StorageFormat min :: StorageFormat -> StorageFormat -> StorageFormat | |
| Show StorageFormat Source # | |
Defined in Hledger.Data.Types Methods showsPrec :: Int -> StorageFormat -> ShowS show :: StorageFormat -> String showList :: [StorageFormat] -> ShowS | |
data TMPostingRule Source #
A transaction modifier transformation, which adds an extra posting to the matched posting's transaction. Can be like a regular posting, or can have the tmprIsMultiplier flag set, indicating that it's a multiplier for the matched posting's amount.
Constructors
| TMPostingRule | |
Fields
| |
Instances
| ToJSON TMPostingRule | |||||
Defined in Hledger.Data.Json Methods toJSON :: TMPostingRule -> Value toEncoding :: TMPostingRule -> Encoding toJSONList :: [TMPostingRule] -> Value toEncodingList :: [TMPostingRule] -> Encoding omitField :: TMPostingRule -> Bool | |||||
| NFData TMPostingRule Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: TMPostingRule -> () | |||||
| Eq TMPostingRule Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic TMPostingRule Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show TMPostingRule Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> TMPostingRule -> ShowS show :: TMPostingRule -> String showList :: [TMPostingRule] -> ShowS | |||||
| type Rep TMPostingRule Source # | |||||
Defined in Hledger.Data.Types type Rep TMPostingRule = D1 ('MetaData "TMPostingRule" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "TMPostingRule" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmprPosting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Posting) :*: S1 ('MetaSel ('Just "tmprIsMultiplier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) | |||||
newtype TagDeclarationInfo Source #
Extra information found in a tag directive.
Constructors
| TagDeclarationInfo | |
Fields
| |
Instances
| ToJSON TagDeclarationInfo | |||||
Defined in Hledger.Data.Json Methods toJSON :: TagDeclarationInfo -> Value toEncoding :: TagDeclarationInfo -> Encoding toJSONList :: [TagDeclarationInfo] -> Value toEncodingList :: [TagDeclarationInfo] -> Encoding omitField :: TagDeclarationInfo -> Bool | |||||
| NFData TagDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: TagDeclarationInfo -> () | |||||
| Eq TagDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: TagDeclarationInfo -> TagDeclarationInfo -> Bool (/=) :: TagDeclarationInfo -> TagDeclarationInfo -> Bool | |||||
| Generic TagDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: TagDeclarationInfo -> Rep TagDeclarationInfo x to :: Rep TagDeclarationInfo x -> TagDeclarationInfo | |||||
| Show TagDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> TagDeclarationInfo -> ShowS show :: TagDeclarationInfo -> String showList :: [TagDeclarationInfo] -> ShowS | |||||
| type Rep TagDeclarationInfo Source # | |||||
Defined in Hledger.Data.Types type Rep TagDeclarationInfo = D1 ('MetaData "TagDeclarationInfo" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'True) (C1 ('MetaCons "TagDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "tdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
data TimeclockCode Source #
Constructors
| SetBalance | |
| SetRequiredHours | |
| In | |
| Out | |
| FinalOut |
Instances
| ToJSON TimeclockCode | |||||
Defined in Hledger.Data.Json Methods toJSON :: TimeclockCode -> Value toEncoding :: TimeclockCode -> Encoding toJSONList :: [TimeclockCode] -> Value toEncodingList :: [TimeclockCode] -> Encoding omitField :: TimeclockCode -> Bool | |||||
| NFData TimeclockCode Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: TimeclockCode -> () | |||||
| Eq TimeclockCode Source # | |||||
Defined in Hledger.Data.Types | |||||
| Ord TimeclockCode Source # | |||||
Defined in Hledger.Data.Types Methods compare :: TimeclockCode -> TimeclockCode -> Ordering (<) :: TimeclockCode -> TimeclockCode -> Bool (<=) :: TimeclockCode -> TimeclockCode -> Bool (>) :: TimeclockCode -> TimeclockCode -> Bool (>=) :: TimeclockCode -> TimeclockCode -> Bool max :: TimeclockCode -> TimeclockCode -> TimeclockCode min :: TimeclockCode -> TimeclockCode -> TimeclockCode | |||||
| Generic TimeclockCode Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Read TimeclockCode | |||||
Defined in Hledger.Data.Timeclock Methods readsPrec :: Int -> ReadS TimeclockCode readList :: ReadS [TimeclockCode] readPrec :: ReadPrec TimeclockCode readListPrec :: ReadPrec [TimeclockCode] | |||||
| Show TimeclockCode | |||||
Defined in Hledger.Data.Timeclock Methods showsPrec :: Int -> TimeclockCode -> ShowS show :: TimeclockCode -> String showList :: [TimeclockCode] -> ShowS | |||||
| type Rep TimeclockCode Source # | |||||
Defined in Hledger.Data.Types type Rep TimeclockCode = D1 ('MetaData "TimeclockCode" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) ((C1 ('MetaCons "SetBalance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetRequiredHours" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "In" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Out" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FinalOut" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data TimeclockEntry Source #
Constructors
| TimeclockEntry | |
Fields
| |
Instances
| ToJSON TimeclockEntry | |||||
Defined in Hledger.Data.Json Methods toJSON :: TimeclockEntry -> Value toEncoding :: TimeclockEntry -> Encoding toJSONList :: [TimeclockEntry] -> Value toEncodingList :: [TimeclockEntry] -> Encoding omitField :: TimeclockEntry -> Bool | |||||
| NFData TimeclockEntry Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: TimeclockEntry -> () | |||||
| Eq TimeclockEntry Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: TimeclockEntry -> TimeclockEntry -> Bool (/=) :: TimeclockEntry -> TimeclockEntry -> Bool | |||||
| Ord TimeclockEntry Source # | |||||
Defined in Hledger.Data.Types Methods compare :: TimeclockEntry -> TimeclockEntry -> Ordering (<) :: TimeclockEntry -> TimeclockEntry -> Bool (<=) :: TimeclockEntry -> TimeclockEntry -> Bool (>) :: TimeclockEntry -> TimeclockEntry -> Bool (>=) :: TimeclockEntry -> TimeclockEntry -> Bool max :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry min :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry | |||||
| Generic TimeclockEntry Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show TimeclockEntry | |||||
Defined in Hledger.Data.Timeclock Methods showsPrec :: Int -> TimeclockEntry -> ShowS show :: TimeclockEntry -> String showList :: [TimeclockEntry] -> ShowS | |||||
| type Rep TimeclockEntry Source # | |||||
Defined in Hledger.Data.Types type Rep TimeclockEntry = D1 ('MetaData "TimeclockEntry" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "TimeclockEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tlsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "tlcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TimeclockCode) :*: S1 ('MetaSel ('Just "tldatetime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LocalTime))) :*: ((S1 ('MetaSel ('Just "tlaccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "tldescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tlcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "tltags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]))))) | |||||
data Transaction Source #
Constructors
| Transaction | |
Fields
| |
Instances
| FromJSON Transaction | |||||
Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Transaction parseJSONList :: Value -> Parser [Transaction] omittedField :: Maybe Transaction | |||||
| ToJSON Transaction | |||||
Defined in Hledger.Data.Json Methods toJSON :: Transaction -> Value toEncoding :: Transaction -> Encoding toJSONList :: [Transaction] -> Value toEncodingList :: [Transaction] -> Encoding omitField :: Transaction -> Bool | |||||
| NFData Transaction Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: Transaction -> () | |||||
| Eq Transaction Source # | |||||
Defined in Hledger.Data.Types | |||||
| Generic Transaction Source # | |||||
Defined in Hledger.Data.Types Associated Types
| |||||
| Show Transaction Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> Transaction -> ShowS show :: Transaction -> String showList :: [Transaction] -> ShowS | |||||
| HasAmounts Transaction Source # | |||||
Defined in Hledger.Data.Transaction Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Transaction -> Transaction Source # | |||||
| HasAmounts AccountTransactionsReportItem Source # | |||||
Defined in Hledger.Reports.AccountTransactionsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> AccountTransactionsReportItem -> AccountTransactionsReportItem Source # | |||||
| type Rep Transaction Source # | |||||
Defined in Hledger.Data.Types type Rep Transaction = D1 ('MetaData "Transaction" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "Transaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tindex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "tprecedingcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (SourcePos, SourcePos)) :*: (S1 ('MetaSel ('Just "tdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Day) :*: S1 ('MetaSel ('Just "tdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Day))))) :*: ((S1 ('MetaSel ('Just "tstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Status) :*: (S1 ('MetaSel ('Just "tcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "tdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "tcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "tpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Posting])))))) | |||||
data TransactionModifier Source #
A transaction modifier rule. This has a query which matches postings in the journal, and a list of transformations to apply to those postings or their transactions. Currently there is one kind of transformation: the TMPostingRule, which adds a posting ("auto posting") to the transaction, optionally setting its amount to the matched posting's amount multiplied by a constant.
Constructors
| TransactionModifier | |
Fields
| |
Instances
| ToJSON TransactionModifier | |||||
Defined in Hledger.Data.Json Methods toJSON :: TransactionModifier -> Value toEncoding :: TransactionModifier -> Encoding toJSONList :: [TransactionModifier] -> Value toEncodingList :: [TransactionModifier] -> Encoding omitField :: TransactionModifier -> Bool | |||||
| NFData TransactionModifier Source # | |||||
Defined in Hledger.Data.Types Methods rnf :: TransactionModifier -> () | |||||
| Eq TransactionModifier Source # | |||||
Defined in Hledger.Data.Types Methods (==) :: TransactionModifier -> TransactionModifier -> Bool (/=) :: TransactionModifier -> TransactionModifier -> Bool | |||||
| Generic TransactionModifier Source # | |||||
Defined in Hledger.Data.Types Associated Types
Methods from :: TransactionModifier -> Rep TransactionModifier x to :: Rep TransactionModifier x -> TransactionModifier | |||||
| Show TransactionModifier Source # | |||||
Defined in Hledger.Data.Types Methods showsPrec :: Int -> TransactionModifier -> ShowS show :: TransactionModifier -> String showList :: [TransactionModifier] -> ShowS | |||||
| type Rep TransactionModifier Source # | |||||
Defined in Hledger.Data.Types type Rep TransactionModifier = D1 ('MetaData "TransactionModifier" "Hledger.Data.Types" "hledger-lib-2.0-5NBavNmBvhzFPKtDMBoaVJ" 'False) (C1 ('MetaCons "TransactionModifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmquerytxt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "tmpostingrules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TMPostingRule]))) | |||||
Constructors
| PrimaryDate | |
| SecondaryDate |
Instances
Orphan instances
| ToMarkup Quantity Source # | |||||
| Generic (DecimalRaw a) Source # | |||||
Associated Types
| |||||