Hledger.Data.Types

hledger-lib-1.41: A library providing the core functionality of hledger

Safe Haskell | None
Language | Haskell2010

Hledger.Data.Types

Contents

- Orphan instances

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

- data Side
  - = L
  - | R
- data TimeclockCode
  - = SetBalance
  - | SetRequiredHours
  - | In
  - | Out
  - | FinalOut
- type Tag = (TagName, TagValue)
- data AccountType
  - = Asset
  - | Liability
  - | Equity
  - | Revenue
  - | Expense
  - | Cash
  - | Conversion
- data SepFormat
  - = Csv
  - | Tsv
  - | Ssv
- data Status
  - = Unmarked
  - | Pending
  - | Cleared
- data SmartInterval
  - = Day
  - | Week
  - | Month
  - | Quarter
  - | Year
- data Period
  - = DayPeriod Day
  - | WeekPeriod Day
  - | MonthPeriod Year Month
  - | QuarterPeriod Year Quarter
  - | YearPeriod Year
  - | PeriodBetween Day Day
  - | PeriodFrom Day
  - | PeriodTo Day
  - | PeriodAll
- type YearDay = Int
- type Month = Int
- type MonthDay = Int
- data Interval
  - = NoInterval
  - | Days Int
  - | Weeks Int
  - | Months Int
  - | Quarters Int
  - | Years Int
  - | NthWeekdayOfMonth Int Int
  - | MonthDay Int
  - | MonthAndDay Int Int
  - | DaysOfWeek [Int]
- type Quarter = Int
- data MixedAmountKey
  - = MixedAmountKeyNoCost !CommoditySymbol
  - | MixedAmountKeyTotalCost !CommoditySymbol !CommoditySymbol
  - | MixedAmountKeyUnitCost !CommoditySymbol !CommoditySymbol !Quantity
- newtype MixedAmount = Mixed (Map MixedAmountKey Amount)
- data Account = Account {
  - aname :: AccountName
  - adeclarationinfo :: Maybe AccountDeclarationInfo
  - asubs :: [Account]
  - aparent :: Maybe Account
  - aboring :: Bool
  - anumpostings :: Int
  - aebalance :: MixedAmount
  - aibalance :: MixedAmount
  }
- type AccountName = Text
- data Amount = Amount {
  - acommodity :: !CommoditySymbol
  - aquantity :: !Quantity
  - astyle :: !AmountStyle
  - acost :: !(Maybe AmountCost)
  }
- data Journal = Journal {
  - jparsedefaultyear :: Maybe Year
  - jparsedefaultcommodity :: Maybe (CommoditySymbol, AmountStyle)
  - jparsedecimalmark :: Maybe DecimalMark
  - jparseparentaccounts :: [AccountName]
  - jparsealiases :: [AccountAlias]
  - jparsetimeclockentries :: [TimeclockEntry]
  - jincludefilestack :: [FilePath]
  - 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
  - jinferredcommoditystyles :: Map CommoditySymbol AmountStyle
  - jglobalcommoditystyles :: Map CommoditySymbol AmountStyle
  - jpricedirectives :: [PriceDirective]
  - jinferredmarketprices :: [MarketPrice]
  - jtxnmodifiers :: [TransactionModifier]
  - jperiodictxns :: [PeriodicTransaction]
  - jtxns :: [Transaction]
  - jfinalcommentlines :: Text
  - jfiles :: [(FilePath, Text)]
  - jlastreadtime :: POSIXTime
  }
- data Ledger = Ledger {
  - ljournal :: Journal
  - laccounts :: [Account]
  }
- 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
  - ptype :: PostingType
  - ptags :: [Tag]
  - pbalanceassertion :: Maybe BalanceAssertion
  - ptransaction :: Maybe Transaction
  - poriginal :: Maybe Posting
  }
- data StorageFormat
  - = Rules
  - | Journal'
  - | Ledger'
  - | Timeclock
  - | Timedot
  - | Sep SepFormat
- data Transaction = Transaction {
  - tindex :: Integer
  - tprecedingcomment :: Text
  - tsourcepos :: (SourcePos, SourcePos)
  - tdate :: Day
  - tdate2 :: Maybe Day
  - tstatus :: Status
  - tcode :: Text
  - tdescription :: Text
  - tcomment :: Text
  - ttags :: [Tag]
  - tpostings :: [Posting]
  }
- data TransactionModifier = TransactionModifier {
  - tmquerytxt :: Text
  - tmpostingrules :: [TMPostingRule]
  }
- fromEFDay :: EFDay -> Day
- modifyEFDay :: (Day -> Day) -> EFDay -> EFDay
- type CommoditySymbol = Text
- data AmountPrecision
  - = Precision !Word8
  - | NaturalPrecision
- data AmountStyle = AmountStyle {
  - ascommodityside :: !Side
  - ascommodityspaced :: !Bool
  - asdigitgroups :: !(Maybe DigitGroupStyle)
  - asdecimalmark :: !(Maybe Char)
  - asprecision :: !AmountPrecision
  - asrounding :: !Rounding
  }
- data EFDay
  - = Exact Day
  - | Flex Day
- type YearWeek = Int
- type MonthWeek = Int
- type WeekDay = Int
- data SmartDate
  - = SmartCompleteDate Day
  - | SmartAssumeStart Year (Maybe Month)
  - | SmartFromReference (Maybe Month) MonthDay
  - | SmartMonth Month
  - | SmartRelative Integer SmartInterval
- data WhichDate
  - = PrimaryDate
  - | SecondaryDate
- data DateSpan = DateSpan (Maybe EFDay) (Maybe EFDay)
- type Payee = Text
- data DepthSpec = DepthSpec {
  - dsFlatDepth :: Maybe Int
  - dsRegexpDepths :: [(Regexp, Int)]
  }
- isBalanceSheetAccountType :: AccountType -> Bool
- isIncomeStatementAccountType :: AccountType -> Bool
- isAccountSubtypeOf :: AccountType -> AccountType -> Bool
- data AccountAlias
  - = BasicAlias AccountName AccountName
  - | RegexAlias Regexp Replacement
- type DecimalMark = Char
- isDecimalMark :: Char -> Bool
- type Quantity = Decimal
- data AmountCost
  - = UnitCost !Amount
  - | TotalCost !Amount
- data DigitGroupStyle = DigitGroups !Char ![Word8]
- data Rounding
  - = NoRounding
  - | SoftRounding
  - | HardRounding
  - | AllRounding
- data Commodity = Commodity {
  - csymbol :: CommoditySymbol
  - cformat :: Maybe AmountStyle
  }
- class HasAmounts a where
  - styleAmounts :: Map CommoditySymbol AmountStyle -> a -> a
- maCompare :: MixedAmount -> MixedAmount -> Ordering
- data PostingType
  - = RegularPosting
  - | VirtualPosting
  - | BalancedVirtualPosting
- type TagName = Text
- type TagValue = Text
- type HiddenTag = Tag
- type DateTag = (TagName, Day)
- toHiddenTag :: Tag -> HiddenTag
- toHiddenTagName :: TagName -> TagName
- toVisibleTag :: HiddenTag -> Tag
- toVisibleTagName :: TagName -> TagName
- isHiddenTagName :: TagName -> Bool
- nullsourcepos :: SourcePos
- nullsourcepospair :: (SourcePos, SourcePos)
- data BalanceAssertion = BalanceAssertion {
  - baamount :: Amount
  - batotal :: Bool
  - bainclusive :: Bool
  - baposition :: SourcePos
  }
- data TMPostingRule = TMPostingRule {
  - tmprPosting :: Posting
  - tmprIsMultiplier :: Bool
  }
- nulltransactionmodifier :: TransactionModifier
- nullperiodictransaction :: PeriodicTransaction
- data TimeclockEntry = TimeclockEntry {
  - tlsourcepos :: SourcePos
  - tlcode :: TimeclockCode
  - tldatetime :: LocalTime
  - tlaccount :: AccountName
  - tldescription :: Text
  - tlcomment :: Text
  - tltags :: [Tag]
  }
- data PriceDirective = PriceDirective {
  - pdsourcepos :: SourcePos
  - pddate :: Day
  - pdcommodity :: CommoditySymbol
  - pdamount :: Amount
  }
- data MarketPrice = MarketPrice {
  - mpdate :: Day
  - mpfrom :: CommoditySymbol
  - mpto :: CommoditySymbol
  - mprate :: Quantity
  }
- showMarketPrice :: MarketPrice -> String
- showMarketPrices :: [MarketPrice] -> [Char]
- data PayeeDeclarationInfo = PayeeDeclarationInfo {
  - pdicomment :: Text
  - pditags :: [Tag]
  }
- newtype TagDeclarationInfo = TagDeclarationInfo {
  - tdicomment :: Text
  }
- data AccountDeclarationInfo = AccountDeclarationInfo {
  - adicomment :: Text
  - aditags :: [Tag]
  - adideclarationorder :: Int
  - adisourcepos :: SourcePos
  }
- type ParsedJournal = Journal
- nullpayeedeclarationinfo :: PayeeDeclarationInfo
- nulltagdeclarationinfo :: TagDeclarationInfo
- nullaccountdeclarationinfo :: AccountDeclarationInfo
- data NormalSign
  - = NormallyPositive
  - | NormallyNegative
- type Year = Integer

# Documentation

data Side #

Constructors

L |
R |

#### Instances

Instances details

FromJSON Side # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Side # parseJSONList :: Value -> Parser [Side] # omittedField :: Maybe Side #
ToJSON Side # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Side -> Value # toEncoding :: Side -> Encoding # toJSONList :: [Side] -> Value # toEncodingList :: [Side] -> Encoding # omitField :: Side -> Bool #
Generic Side # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Side |
Instance details Defined in Hledger.Data.Types type Rep Side = D1 ('MetaData "Side" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type))
Methods from :: Side -> Rep Side x # to :: Rep Side x -> Side #
Read Side # |
Instance details Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS Side # readList :: ReadS [Side] # readPrec :: ReadPrec Side # readListPrec :: ReadPrec [Side] #
Show Side # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Side -> ShowS # show :: Side -> String # showList :: [Side] -> ShowS #
Eq Side # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Side -> Side -> Bool # (/=) :: Side -> Side -> Bool #
Ord Side # |
Instance details Defined in Hledger.Data.Types Methods compare :: Side -> Side -> Ordering # (<) :: Side -> Side -> Bool # (<=) :: Side -> Side -> Bool # (>) :: Side -> Side -> Bool # (>=) :: Side -> Side -> Bool # max :: Side -> Side -> Side # min :: Side -> Side -> Side #
type Rep Side # |
Instance details Defined in Hledger.Data.Types type Rep Side = D1 ('MetaData "Side" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type))

data TimeclockCode #

Constructors

SetBalance |
SetRequiredHours |
In |
Out |
FinalOut |

#### Instances

Instances details

ToJSON TimeclockCode # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: TimeclockCode -> Value # toEncoding :: TimeclockCode -> Encoding # toJSONList :: [TimeclockCode] -> Value # toEncodingList :: [TimeclockCode] -> Encoding # omitField :: TimeclockCode -> Bool #
Generic TimeclockCode # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep TimeclockCode |
Instance details Defined in Hledger.Data.Types type Rep TimeclockCode = D1 ('MetaData "TimeclockCode" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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))))
Methods from :: TimeclockCode -> Rep TimeclockCode x # to :: Rep TimeclockCode x -> TimeclockCode #
Read TimeclockCode # |
Instance details Defined in Hledger.Data.Timeclock Methods readsPrec :: Int -> ReadS TimeclockCode # readList :: ReadS [TimeclockCode] # readPrec :: ReadPrec TimeclockCode # readListPrec :: ReadPrec [TimeclockCode] #
Show TimeclockCode # |
Instance details Defined in Hledger.Data.Timeclock Methods showsPrec :: Int -> TimeclockCode -> ShowS # show :: TimeclockCode -> String # showList :: [TimeclockCode] -> ShowS #
Eq TimeclockCode # |
Instance details Defined in Hledger.Data.Types Methods (==) :: TimeclockCode -> TimeclockCode -> Bool # (/=) :: TimeclockCode -> TimeclockCode -> Bool #
Ord TimeclockCode # |
Instance details 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 #
type Rep TimeclockCode # |
Instance details Defined in Hledger.Data.Types type Rep TimeclockCode = D1 ('MetaData "TimeclockCode" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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))))

type Tag #

Arguments

= (TagName, TagValue) | A tag name and (possibly empty) value.

data AccountType #

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

#### Instances

Instances details

ToJSON AccountType # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: AccountType -> Value # toEncoding :: AccountType -> Encoding # toJSONList :: [AccountType] -> Value # toEncodingList :: [AccountType] -> Encoding # omitField :: AccountType -> Bool #
ToJSONKey AccountType # |
Instance details Defined in Hledger.Data.Json Methods toJSONKey :: ToJSONKeyFunction AccountType # toJSONKeyList :: ToJSONKeyFunction [AccountType] #
Generic AccountType # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep AccountType |
Instance details Defined in Hledger.Data.Types type Rep AccountType = D1 ('MetaData "AccountType" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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))))
Methods from :: AccountType -> Rep AccountType x # to :: Rep AccountType x -> AccountType #
Show AccountType # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountType -> ShowS # show :: AccountType -> String # showList :: [AccountType] -> ShowS #
Eq AccountType # |
Instance details Defined in Hledger.Data.Types Methods (==) :: AccountType -> AccountType -> Bool # (/=) :: AccountType -> AccountType -> Bool #
Ord AccountType # |
Instance details 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 #
type Rep AccountType # |
Instance details Defined in Hledger.Data.Types type Rep AccountType = D1 ('MetaData "AccountType" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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))))

data SepFormat #

One of the standard *-separated value file types known by hledger,

Constructors

Csv |
Tsv |
Ssv |

#### Instances

Instances details

Show SepFormat # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> SepFormat -> ShowS # show :: SepFormat -> String # showList :: [SepFormat] -> ShowS #
Eq SepFormat # |
Instance details Defined in Hledger.Data.Types Methods (==) :: SepFormat -> SepFormat -> Bool # (/=) :: SepFormat -> SepFormat -> Bool #

data Status #

The status of a transaction or posting, recorded with a status mark (nothing, !, or *). What these mean is ultimately user defined.

Constructors

Unmarked |
Pending |
Cleared |

#### Instances

Instances details

FromJSON Status # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Status # parseJSONList :: Value -> Parser [Status] # omittedField :: Maybe Status #
ToJSON Status # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Status -> Value # toEncoding :: Status -> Encoding # toJSONList :: [Status] -> Value # toEncodingList :: [Status] -> Encoding # omitField :: Status -> Bool #
Bounded Status # |
Instance details Defined in Hledger.Data.Types Methods minBound :: Status # maxBound :: Status #
Enum Status # |
Instance details Defined in Hledger.Data.Types Methods succ :: Status -> Status # pred :: Status -> Status # toEnum :: Int -> Status # fromEnum :: Status -> Int # enumFrom :: Status -> [Status] # enumFromThen :: Status -> Status -> [Status] # enumFromTo :: Status -> Status -> [Status] # enumFromThenTo :: Status -> Status -> Status -> [Status] #
Generic Status # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Status |
Instance details Defined in Hledger.Data.Types type Rep Status = D1 ('MetaData "Status" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))
Methods from :: Status -> Rep Status x # to :: Rep Status x -> Status #
Show Status # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Status -> ShowS # show :: Status -> String # showList :: [Status] -> ShowS #
Eq Status # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Status -> Status -> Bool # (/=) :: Status -> Status -> Bool #
Ord Status # |
Instance details Defined in Hledger.Data.Types Methods compare :: Status -> Status -> Ordering # (<) :: Status -> Status -> Bool # (<=) :: Status -> Status -> Bool # (>) :: Status -> Status -> Bool # (>=) :: Status -> Status -> Bool # max :: Status -> Status -> Status # min :: Status -> Status -> Status #
type Rep Status # |
Instance details Defined in Hledger.Data.Types type Rep Status = D1 ('MetaData "Status" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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 SmartInterval #

Constructors

Day |
Week |
Month |
Quarter |
Year |

#### Instances

Instances details

Show SmartInterval # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> SmartInterval -> ShowS # show :: SmartInterval -> String # showList :: [SmartInterval] -> ShowS #

data Period #

Constructors

DayPeriod Day |
WeekPeriod Day |
MonthPeriod Year Month |
QuarterPeriod Year Quarter |
YearPeriod Year |
PeriodBetween Day Day |
PeriodFrom Day |
PeriodTo Day |
PeriodAll |

#### Instances

Instances details

ToJSON Period # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Period -> Value # toEncoding :: Period -> Encoding # toJSONList :: [Period] -> Value # toEncodingList :: [Period] -> Encoding # omitField :: Period -> Bool #
Default Period # |
Instance details Defined in Hledger.Data.Types Methods def :: Period #
Generic Period # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Period |
Instance details Defined in Hledger.Data.Types type Rep Period = D1 ('MetaData "Period" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (((C1 ('MetaCons "DayPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "WeekPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) :+: (C1 ('MetaCons "MonthPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Month)) :+: C1 ('MetaCons "QuarterPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quarter)))) :+: ((C1 ('MetaCons "YearPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year)) :+: C1 ('MetaCons "PeriodBetween" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) :+: (C1 ('MetaCons "PeriodFrom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: (C1 ('MetaCons "PeriodTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "PeriodAll" 'PrefixI 'False) (U1 :: Type -> Type)))))
Methods from :: Period -> Rep Period x # to :: Rep Period x -> Period #
Show Period # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Period -> ShowS # show :: Period -> String # showList :: [Period] -> ShowS #
Eq Period # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Period -> Period -> Bool # (/=) :: Period -> Period -> Bool #
Ord Period # |
Instance details Defined in Hledger.Data.Types Methods compare :: Period -> Period -> Ordering # (<) :: Period -> Period -> Bool # (<=) :: Period -> Period -> Bool # (>) :: Period -> Period -> Bool # (>=) :: Period -> Period -> Bool # max :: Period -> Period -> Period # min :: Period -> Period -> Period #
HasAmounts PostingsReportItem # |
Instance details Defined in Hledger.Reports.PostingsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem #
type Rep Period # |
Instance details Defined in Hledger.Data.Types type Rep Period = D1 ('MetaData "Period" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (((C1 ('MetaCons "DayPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "WeekPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) :+: (C1 ('MetaCons "MonthPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Month)) :+: C1 ('MetaCons "QuarterPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quarter)))) :+: ((C1 ('MetaCons "YearPeriod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Year)) :+: C1 ('MetaCons "PeriodBetween" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day))) :+: (C1 ('MetaCons "PeriodFrom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: (C1 ('MetaCons "PeriodTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "PeriodAll" 'PrefixI 'False) (U1 :: Type -> Type)))))

type YearDay = Int #

type Month = Int #

type MonthDay = Int #

data Interval #

Constructors

NoInterval |
Days Int |
Weeks Int |
Months Int |
Quarters Int |
Years Int |
NthWeekdayOfMonth Int Int |
MonthDay Int |
MonthAndDay Int Int |
DaysOfWeek [Int] |

#### Instances

Instances details

ToJSON Interval # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Interval -> Value # toEncoding :: Interval -> Encoding # toJSONList :: [Interval] -> Value # toEncodingList :: [Interval] -> Encoding # omitField :: Interval -> Bool #
Default Interval # |
Instance details Defined in Hledger.Data.Types Methods def :: Interval #
Generic Interval # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Interval |
Instance details Defined in Hledger.Data.Types type Rep Interval = D1 ('MetaData "Interval" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (((C1 ('MetaCons "NoInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Days" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "Weeks" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: (C1 ('MetaCons "Months" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "Quarters" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) :+: ((C1 ('MetaCons "Years" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "NthWeekdayOfMonth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "MonthDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: (C1 ('MetaCons "MonthAndDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "DaysOfWeek" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]))))))
Methods from :: Interval -> Rep Interval x # to :: Rep Interval x -> Interval #
Show Interval # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Interval -> ShowS # show :: Interval -> String # showList :: [Interval] -> ShowS #
Eq Interval # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Interval -> Interval -> Bool # (/=) :: Interval -> Interval -> Bool #
Ord Interval # |
Instance details Defined in Hledger.Data.Types Methods compare :: Interval -> Interval -> Ordering # (<) :: Interval -> Interval -> Bool # (<=) :: Interval -> Interval -> Bool # (>) :: Interval -> Interval -> Bool # (>=) :: Interval -> Interval -> Bool # max :: Interval -> Interval -> Interval # min :: Interval -> Interval -> Interval #
type Rep Interval # |
Instance details Defined in Hledger.Data.Types type Rep Interval = D1 ('MetaData "Interval" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (((C1 ('MetaCons "NoInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Days" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "Weeks" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: (C1 ('MetaCons "Months" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "Quarters" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) :+: ((C1 ('MetaCons "Years" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "NthWeekdayOfMonth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "MonthDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: (C1 ('MetaCons "MonthAndDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "DaysOfWeek" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]))))))

type Quarter = Int #

data MixedAmountKey #

Stores the CommoditySymbol of the Amount, along with the CommoditySymbol of the cost, and its unit cost if being used.

Constructors

MixedAmountKeyNoCost !CommoditySymbol |
MixedAmountKeyTotalCost !CommoditySymbol !CommoditySymbol |
MixedAmountKeyUnitCost !CommoditySymbol !CommoditySymbol !Quantity |

#### Instances

Instances details

Generic MixedAmountKey # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep MixedAmountKey |
Instance details Defined in Hledger.Data.Types type Rep MixedAmountKey = D1 ('MetaData "MixedAmountKey" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "MixedAmountKeyNoCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol)) :+: (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)) :+: 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)))))
Methods from :: MixedAmountKey -> Rep MixedAmountKey x # to :: Rep MixedAmountKey x -> MixedAmountKey #
Show MixedAmountKey # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> MixedAmountKey -> ShowS # show :: MixedAmountKey -> String # showList :: [MixedAmountKey] -> ShowS #
Eq MixedAmountKey # |
Instance details Defined in Hledger.Data.Types Methods (==) :: MixedAmountKey -> MixedAmountKey -> Bool # (/=) :: MixedAmountKey -> MixedAmountKey -> Bool #
Ord MixedAmountKey # | We don't auto-derive the Ord instance because it would give an undesired ordering. We want the keys to be sorted lexicographically: (1) By the primary commodity of the amount. (2) By the commodity of the cost, with no cost being first. (3) By the unit cost, from most negative to most positive, with total costs before unit costs. For example, we would like the ordering to give MixedAmountKeyNoCost X < MixedAmountKeyTotalCost X Z < MixedAmountKeyNoCost Y
Instance details 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 #
type Rep MixedAmountKey # |
Instance details Defined in Hledger.Data.Types type Rep MixedAmountKey = D1 ('MetaData "MixedAmountKey" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "MixedAmountKeyNoCost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CommoditySymbol)) :+: (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)) :+: 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)))))

newtype MixedAmount #

Constructors

Mixed (Map MixedAmountKey Amount) |

#### Instances

Instances details

FromJSON MixedAmount # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser MixedAmount # parseJSONList :: Value -> Parser [MixedAmount] # omittedField :: Maybe MixedAmount #
ToJSON MixedAmount # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: MixedAmount -> Value # toEncoding :: MixedAmount -> Encoding # toJSONList :: [MixedAmount] -> Value # toEncodingList :: [MixedAmount] -> Encoding # omitField :: MixedAmount -> Bool #
Monoid MixedAmount # |
Instance details Defined in Hledger.Data.Amount Methods mempty :: MixedAmount # mappend :: MixedAmount -> MixedAmount -> MixedAmount # mconcat :: [MixedAmount] -> MixedAmount #
Semigroup MixedAmount # |
Instance details Defined in Hledger.Data.Amount Methods (<>) :: MixedAmount -> MixedAmount -> MixedAmount # sconcat :: NonEmpty MixedAmount -> MixedAmount # stimes :: Integral b => b -> MixedAmount -> MixedAmount #
Generic MixedAmount # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep MixedAmount |
Instance details Defined in Hledger.Data.Types type Rep MixedAmount = D1 ('MetaData "MixedAmount" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'True) (C1 ('MetaCons "Mixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map MixedAmountKey Amount))))
Methods from :: MixedAmount -> Rep MixedAmount x # to :: Rep MixedAmount x -> MixedAmount #
Num MixedAmount # |
Instance details Defined in Hledger.Data.Amount Methods (+) :: MixedAmount -> MixedAmount -> MixedAmount # (-) :: MixedAmount -> MixedAmount -> MixedAmount # (*) :: MixedAmount -> MixedAmount -> MixedAmount # negate :: MixedAmount -> MixedAmount # abs :: MixedAmount -> MixedAmount # signum :: MixedAmount -> MixedAmount # fromInteger :: Integer -> MixedAmount #
Show MixedAmount # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> MixedAmount -> ShowS # show :: MixedAmount -> String # showList :: [MixedAmount] -> ShowS #
Eq MixedAmount # |
Instance details Defined in Hledger.Data.Types Methods (==) :: MixedAmount -> MixedAmount -> Bool # (/=) :: MixedAmount -> MixedAmount -> Bool #
Ord MixedAmount # |
Instance details Defined in Hledger.Data.Types Methods compare :: MixedAmount -> MixedAmount -> Ordering # (<) :: MixedAmount -> MixedAmount -> Bool # (<=) :: MixedAmount -> MixedAmount -> Bool # (>) :: MixedAmount -> MixedAmount -> Bool # (>=) :: MixedAmount -> MixedAmount -> Bool # max :: MixedAmount -> MixedAmount -> MixedAmount # min :: MixedAmount -> MixedAmount -> MixedAmount #
HasAmounts MixedAmount # |
Instance details Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount #
HasAmounts AccountTransactionsReportItem # |
Instance details Defined in Hledger.Reports.AccountTransactionsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> AccountTransactionsReportItem -> AccountTransactionsReportItem #
HasAmounts BalanceReportItem # |
Instance details Defined in Hledger.Reports.BalanceReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> BalanceReportItem -> BalanceReportItem #
HasAmounts PostingsReportItem # |
Instance details Defined in Hledger.Reports.PostingsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem #
type Rep MixedAmount # |
Instance details Defined in Hledger.Data.Types type Rep MixedAmount = D1 ('MetaData "MixedAmount" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'True) (C1 ('MetaCons "Mixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map MixedAmountKey Amount))))

data Account #

An account, with its balances, parent/subaccount relationships, etc. Only the name is required; the other fields are added when needed.

Constructors

Account |
Fields aname :: AccountName this account's full name adeclarationinfo :: Maybe AccountDeclarationInfo optional extra info from account directives relationships in the tree asubs :: [Account] this account's sub-accounts aparent :: Maybe Account parent account aboring :: Bool used in the accounts report to label elidable parents balance information anumpostings :: Int the number of postings to this account aebalance :: MixedAmount this account's balance, excluding subaccounts aibalance :: MixedAmount this account's balance, including subaccounts

#### Instances

Instances details

FromJSON Account # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Account # parseJSONList :: Value -> Parser [Account] # omittedField :: Maybe Account #
ToJSON Account # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Account -> Value # toEncoding :: Account -> Encoding # toJSONList :: [Account] -> Value # toEncodingList :: [Account] -> Encoding # omitField :: Account -> Bool #
Generic Account # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Account |
Instance details Defined in Hledger.Data.Types type Rep Account = D1 ('MetaData "Account" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Account" 'PrefixI 'True) (((S1 ('MetaSel ('Just "aname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "adeclarationinfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AccountDeclarationInfo))) :*: (S1 ('MetaSel ('Just "asubs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Account]) :*: S1 ('MetaSel ('Just "aparent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Account)))) :*: ((S1 ('MetaSel ('Just "aboring") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "anumpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "aebalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount) :*: S1 ('MetaSel ('Just "aibalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount)))))
Methods from :: Account -> Rep Account x # to :: Rep Account x -> Account #
Show Account # |
Instance details Defined in Hledger.Data.Account Methods showsPrec :: Int -> Account -> ShowS # show :: Account -> String # showList :: [Account] -> ShowS #
Eq Account # |
Instance details Defined in Hledger.Data.Account Methods (==) :: Account -> Account -> Bool # (/=) :: Account -> Account -> Bool #
HasAmounts Account # |
Instance details Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Account -> Account #
type Rep Account # |
Instance details Defined in Hledger.Data.Types type Rep Account = D1 ('MetaData "Account" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Account" 'PrefixI 'True) (((S1 ('MetaSel ('Just "aname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "adeclarationinfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AccountDeclarationInfo))) :*: (S1 ('MetaSel ('Just "asubs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Account]) :*: S1 ('MetaSel ('Just "aparent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Account)))) :*: ((S1 ('MetaSel ('Just "aboring") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "anumpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "aebalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount) :*: S1 ('MetaSel ('Just "aibalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount)))))

type AccountName = Text #

data Amount #

Constructors

Amount |
Fields acommodity :: !CommoditySymbol aquantity :: !Quantity astyle :: !AmountStyle acost :: !(Maybe AmountCost) the (fixed, transaction-specific) cost in another commodity of this amount, if any

#### Instances

Instances details

FromJSON Amount # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Amount # parseJSONList :: Value -> Parser [Amount] # omittedField :: Maybe Amount #
ToJSON Amount # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Amount -> Value # toEncoding :: Amount -> Encoding # toJSONList :: [Amount] -> Value # toEncodingList :: [Amount] -> Encoding # omitField :: Amount -> Bool #
Generic Amount # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Amount |
Instance details Defined in Hledger.Data.Types type Rep Amount = D1 ('MetaData "Amount" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))))
Methods from :: Amount -> Rep Amount x # to :: Rep Amount x -> Amount #
Num Amount # |
Instance details Defined in Hledger.Data.Amount Methods (+) :: Amount -> Amount -> Amount # (-) :: Amount -> Amount -> Amount # (*) :: Amount -> Amount -> Amount # negate :: Amount -> Amount # abs :: Amount -> Amount # signum :: Amount -> Amount # fromInteger :: Integer -> Amount #
Show Amount # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Amount -> ShowS # show :: Amount -> String # showList :: [Amount] -> ShowS #
Eq Amount # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Amount -> Amount -> Bool # (/=) :: Amount -> Amount -> Bool #
Ord Amount # |
Instance details Defined in Hledger.Data.Types Methods compare :: Amount -> Amount -> Ordering # (<) :: Amount -> Amount -> Bool # (<=) :: Amount -> Amount -> Bool # (>) :: Amount -> Amount -> Bool # (>=) :: Amount -> Amount -> Bool # max :: Amount -> Amount -> Amount # min :: Amount -> Amount -> Amount #
HasAmounts Amount # |
Instance details Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
type Rep Amount # |
Instance details Defined in Hledger.Data.Types type Rep Amount = D1 ('MetaData "Amount" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))))

data Journal #

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 jparsedefaultyear :: Maybe Year the current default year, specified by the most recent Y directive (or current date) jparsedefaultcommodity :: Maybe (CommoditySymbol, AmountStyle) the current default commodity and its format, specified by the most recent D directive jparsedecimalmark :: Maybe DecimalMark the character to always parse as decimal point, if set by CsvReader's decimal-mark (or a future journal directive) jparseparentaccounts :: [AccountName] the current stack of parent account names, specified by apply account directives jparsealiases :: [AccountAlias] the current account name aliases in effect, specified by alias directives (& options ?) ,jparsetransactioncount :: Integer -- ^ the current count of transactions parsed so far (only journal format txns, currently) jparsetimeclockentries :: [TimeclockEntry] timeclock sessions which have not been clocked out jincludefilestack :: [FilePath] jdeclaredpayees :: [(Payee, PayeeDeclarationInfo)] Payees declared by payee directives, in parse order. jdeclaredtags :: [(TagName, TagDeclarationInfo)] Tags declared by tag directives, in parse order. jdeclaredaccounts :: [(AccountName, AccountDeclarationInfo)] Accounts declared by account directives, in parse order. jdeclaredaccounttags :: Map AccountName [Tag] Accounts which were declared with tags, and those tags. jdeclaredaccounttypes :: Map AccountType [AccountName] Accounts which were declared with a type: tag, grouped by the type. jaccounttypes :: Map AccountName AccountType All the account types known, from account declarations or account names or parent accounts. jdeclaredcommodities :: Map CommoditySymbol Commodity Commodities (and their display styles) declared by commodity directives, in parse order. jinferredcommoditystyles :: Map CommoditySymbol AmountStyle Commodity display styles inferred from amounts in the journal. jglobalcommoditystyles :: Map CommoditySymbol AmountStyle Commodity display styles declared by command line options (sometimes augmented, see the import command). jpricedirectives :: [PriceDirective] P (market price) directives in the journal, in parse order. jinferredmarketprices :: [MarketPrice] Market prices inferred from transactions in the journal, in parse order. jtxnmodifiers :: [TransactionModifier] Auto posting rules declared in the journal. jperiodictxns :: [PeriodicTransaction] Periodic transaction rules declared in the journal. jtxns :: [Transaction] Transactions recorded in the journal. The important bit. jfinalcommentlines :: Text any final trailing comments in the (main) journal file jfiles :: [(FilePath, Text)] the file path and raw text of the main and any included journal files. The main file is first, followed by any included files in the order encountered. TODO: FilePath is a sloppy type here, don't assume it's a real file; values like "", "-", "(string)" can be seen jlastreadtime :: POSIXTime when this journal was last read from its file(s) NOTE: after adding new fields, eg involving account names, consider updating the Anon instance in Hleger.Cli.Anon

#### Instances

Instances details

ToJSON Journal # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Journal -> Value # toEncoding :: Journal -> Encoding # toJSONList :: [Journal] -> Value # toEncodingList :: [Journal] -> Encoding # omitField :: Journal -> Bool #
Default Journal # |
Instance details Defined in Hledger.Data.Journal Methods def :: Journal #
Semigroup Journal # |
Instance details Defined in Hledger.Data.Journal Methods (<>) :: Journal -> Journal -> Journal # sconcat :: NonEmpty Journal -> Journal # stimes :: Integral b => b -> Journal -> Journal #
Generic Journal # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Journal |
Instance details Defined in Hledger.Data.Types type Rep Journal = D1 ('MetaData "Journal" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Journal" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "jparsedefaultyear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Year)) :*: (S1 ('MetaSel ('Just "jparsedefaultcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CommoditySymbol, AmountStyle))) :*: S1 ('MetaSel ('Just "jparsedecimalmark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DecimalMark)))) :*: (S1 ('MetaSel ('Just "jparseparentaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AccountName]) :*: (S1 ('MetaSel ('Just "jparsealiases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AccountAlias]) :*: S1 ('MetaSel ('Just "jparsetimeclockentries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TimeclockEntry])))) :*: ((S1 ('MetaSel ('Just "jincludefilestack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: (S1 ('MetaSel ('Just "jdeclaredpayees") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Payee, PayeeDeclarationInfo)]) :*: S1 ('MetaSel ('Just "jdeclaredtags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(TagName, TagDeclarationInfo)]))) :*: (S1 ('MetaSel ('Just "jdeclaredaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(AccountName, AccountDeclarationInfo)]) :*: (S1 ('MetaSel ('Just "jdeclaredaccounttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountName [Tag])) :*: S1 ('MetaSel ('Just "jdeclaredaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountType [AccountName])))))) :*: (((S1 ('MetaSel ('Just "jaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountName AccountType)) :*: (S1 ('MetaSel ('Just "jdeclaredcommodities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol Commodity)) :*: S1 ('MetaSel ('Just "jinferredcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle)))) :*: (S1 ('MetaSel ('Just "jglobalcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle)) :*: (S1 ('MetaSel ('Just "jpricedirectives") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PriceDirective]) :*: S1 ('MetaSel ('Just "jinferredmarketprices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [MarketPrice])))) :*: ((S1 ('MetaSel ('Just "jtxnmodifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TransactionModifier]) :*: (S1 ('MetaSel ('Just "jperiodictxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PeriodicTransaction]) :*: S1 ('MetaSel ('Just "jtxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Transaction]))) :*: (S1 ('MetaSel ('Just "jfinalcommentlines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "jfiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(FilePath, Text)]) :*: S1 ('MetaSel ('Just "jlastreadtime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime)))))))
Methods from :: Journal -> Rep Journal x # to :: Rep Journal x -> Journal #
Show Journal # |
Instance details Defined in Hledger.Data.Journal Methods showsPrec :: Int -> Journal -> ShowS # show :: Journal -> String # showList :: [Journal] -> ShowS #
Eq Journal # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Journal -> Journal -> Bool # (/=) :: Journal -> Journal -> Bool #
type Rep Journal # |
Instance details Defined in Hledger.Data.Types type Rep Journal = D1 ('MetaData "Journal" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Journal" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "jparsedefaultyear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Year)) :*: (S1 ('MetaSel ('Just "jparsedefaultcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CommoditySymbol, AmountStyle))) :*: S1 ('MetaSel ('Just "jparsedecimalmark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DecimalMark)))) :*: (S1 ('MetaSel ('Just "jparseparentaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AccountName]) :*: (S1 ('MetaSel ('Just "jparsealiases") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AccountAlias]) :*: S1 ('MetaSel ('Just "jparsetimeclockentries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TimeclockEntry])))) :*: ((S1 ('MetaSel ('Just "jincludefilestack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: (S1 ('MetaSel ('Just "jdeclaredpayees") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Payee, PayeeDeclarationInfo)]) :*: S1 ('MetaSel ('Just "jdeclaredtags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(TagName, TagDeclarationInfo)]))) :*: (S1 ('MetaSel ('Just "jdeclaredaccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(AccountName, AccountDeclarationInfo)]) :*: (S1 ('MetaSel ('Just "jdeclaredaccounttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountName [Tag])) :*: S1 ('MetaSel ('Just "jdeclaredaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountType [AccountName])))))) :*: (((S1 ('MetaSel ('Just "jaccounttypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AccountName AccountType)) :*: (S1 ('MetaSel ('Just "jdeclaredcommodities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol Commodity)) :*: S1 ('MetaSel ('Just "jinferredcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle)))) :*: (S1 ('MetaSel ('Just "jglobalcommoditystyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle)) :*: (S1 ('MetaSel ('Just "jpricedirectives") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PriceDirective]) :*: S1 ('MetaSel ('Just "jinferredmarketprices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [MarketPrice])))) :*: ((S1 ('MetaSel ('Just "jtxnmodifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TransactionModifier]) :*: (S1 ('MetaSel ('Just "jperiodictxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PeriodicTransaction]) :*: S1 ('MetaSel ('Just "jtxns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Transaction]))) :*: (S1 ('MetaSel ('Just "jfinalcommentlines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "jfiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(FilePath, Text)]) :*: S1 ('MetaSel ('Just "jlastreadtime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime)))))))

data Ledger #

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.

Constructors

Ledger |
Fields ljournal :: Journal laccounts :: [Account]

#### Instances

Instances details

ToJSON Ledger # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Ledger -> Value # toEncoding :: Ledger -> Encoding # toJSONList :: [Ledger] -> Value # toEncodingList :: [Ledger] -> Encoding # omitField :: Ledger -> Bool #
Generic Ledger # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Ledger |
Instance details Defined in Hledger.Data.Types type Rep Ledger = D1 ('MetaData "Ledger" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Ledger" 'PrefixI 'True) (S1 ('MetaSel ('Just "ljournal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Journal) :*: S1 ('MetaSel ('Just "laccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Account])))
Methods from :: Ledger -> Rep Ledger x # to :: Rep Ledger x -> Ledger #
Show Ledger # |
Instance details Defined in Hledger.Data.Ledger Methods showsPrec :: Int -> Ledger -> ShowS # show :: Ledger -> String # showList :: [Ledger] -> ShowS #
type Rep Ledger # |
Instance details Defined in Hledger.Data.Types type Rep Ledger = D1 ('MetaData "Ledger" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Ledger" 'PrefixI 'True) (S1 ('MetaSel ('Just "ljournal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Journal) :*: S1 ('MetaSel ('Just "laccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Account])))

data PeriodicTransaction #

A periodic transaction rule, describing a transaction that recurs.

Constructors

PeriodicTransaction |
Fields ptperiodexpr :: Text the period expression as written ptinterval :: Interval the interval at which this transaction recurs ptspan :: DateSpan the (possibly unbounded) period during which this transaction recurs. Contains a whole number of intervals. ptsourcepos :: (SourcePos, SourcePos) the file position where the period expression starts, and where the last posting ends ptstatus :: Status some of Transaction's fields ptcode :: Text ptdescription :: Text ptcomment :: Text pttags :: [Tag] ptpostings :: [Posting]

#### Instances

Instances details

ToJSON PeriodicTransaction # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: PeriodicTransaction -> Value # toEncoding :: PeriodicTransaction -> Encoding # toJSONList :: [PeriodicTransaction] -> Value # toEncodingList :: [PeriodicTransaction] -> Encoding # omitField :: PeriodicTransaction -> Bool #
Generic PeriodicTransaction # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep PeriodicTransaction |
Instance details Defined in Hledger.Data.Types type Rep PeriodicTransaction = D1 ('MetaData "PeriodicTransaction" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "PeriodicTransaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "ptperiodexpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptinterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Interval)) :*: (S1 ('MetaSel ('Just "ptspan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DateSpan) :*: (S1 ('MetaSel ('Just "ptsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourcePos, SourcePos)) :*: S1 ('MetaSel ('Just "ptstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status)))) :*: ((S1 ('MetaSel ('Just "ptcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "ptcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "pttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "ptpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Posting]))))))
Methods from :: PeriodicTransaction -> Rep PeriodicTransaction x # to :: Rep PeriodicTransaction x -> PeriodicTransaction #
Show PeriodicTransaction # |
Instance details Defined in Hledger.Data.PeriodicTransaction Methods showsPrec :: Int -> PeriodicTransaction -> ShowS # show :: PeriodicTransaction -> String # showList :: [PeriodicTransaction] -> ShowS #
Eq PeriodicTransaction # |
Instance details Defined in Hledger.Data.Types Methods (==) :: PeriodicTransaction -> PeriodicTransaction -> Bool # (/=) :: PeriodicTransaction -> PeriodicTransaction -> Bool #
type Rep PeriodicTransaction # |
Instance details Defined in Hledger.Data.Types type Rep PeriodicTransaction = D1 ('MetaData "PeriodicTransaction" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "PeriodicTransaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "ptperiodexpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptinterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Interval)) :*: (S1 ('MetaSel ('Just "ptspan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DateSpan) :*: (S1 ('MetaSel ('Just "ptsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourcePos, SourcePos)) :*: S1 ('MetaSel ('Just "ptstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status)))) :*: ((S1 ('MetaSel ('Just "ptcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "ptdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "ptcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "pttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "ptpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Posting]))))))

data Posting #

Constructors

Posting |
Fields pdate :: Maybe Day this posting's date, if different from the transaction's pdate2 :: Maybe Day this posting's secondary date, if different from the transaction's pstatus :: Status paccount :: AccountName pamount :: MixedAmount pcomment :: Text this posting's comment lines, as a single non-indented multi-line string ptype :: PostingType ptags :: [Tag] tag names and values, extracted from the posting comment and (after finalisation) the posting account's directive if any pbalanceassertion :: Maybe BalanceAssertion an expected balance in the account after this posting, in a single commodity, excluding subaccounts. ptransaction :: Maybe Transaction this posting's parent transaction (co-recursive types). Tying this knot gets tedious, Maybe makes it easier/optional. poriginal :: Maybe Posting When this posting has been transformed in some way (eg its amount or cost was inferred, or the account name was changed by a pivot or budget report), this references the original untransformed posting (which will have Nothing in this field).

#### Instances

Instances details

FromJSON Posting # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Posting # parseJSONList :: Value -> Parser [Posting] # omittedField :: Maybe Posting #
ToJSON Posting # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Posting -> Value # toEncoding :: Posting -> Encoding # toJSONList :: [Posting] -> Value # toEncodingList :: [Posting] -> Encoding # omitField :: Posting -> Bool #
Generic Posting # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Posting |
Instance details Defined in Hledger.Data.Types type Rep Posting = D1 ('MetaData "Posting" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Posting" 'PrefixI 'True) (((S1 ('MetaSel ('Just "pdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day)) :*: S1 ('MetaSel ('Just "pdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))) :*: (S1 ('MetaSel ('Just "pstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "paccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "pamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount)))) :*: ((S1 ('MetaSel ('Just "pcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ptype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PostingType) :*: S1 ('MetaSel ('Just "ptags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]))) :*: (S1 ('MetaSel ('Just "pbalanceassertion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BalanceAssertion)) :*: (S1 ('MetaSel ('Just "ptransaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Transaction)) :*: S1 ('MetaSel ('Just "poriginal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Posting)))))))
Methods from :: Posting -> Rep Posting x # to :: Rep Posting x -> Posting #
Show Posting # | Posting's show instance elides the parent transaction so as not to recurse forever.
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Posting -> ShowS # show :: Posting -> String # showList :: [Posting] -> ShowS #
Eq Posting # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Posting -> Posting -> Bool # (/=) :: Posting -> Posting -> Bool #
HasAmounts Posting # |
Instance details Defined in Hledger.Data.Posting Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Posting -> Posting #
HasAmounts PostingsReportItem # |
Instance details Defined in Hledger.Reports.PostingsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem #
type Rep Posting # |
Instance details Defined in Hledger.Data.Types type Rep Posting = D1 ('MetaData "Posting" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Posting" 'PrefixI 'True) (((S1 ('MetaSel ('Just "pdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day)) :*: S1 ('MetaSel ('Just "pdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))) :*: (S1 ('MetaSel ('Just "pstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "paccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "pamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MixedAmount)))) :*: ((S1 ('MetaSel ('Just "pcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ptype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PostingType) :*: S1 ('MetaSel ('Just "ptags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]))) :*: (S1 ('MetaSel ('Just "pbalanceassertion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BalanceAssertion)) :*: (S1 ('MetaSel ('Just "ptransaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Transaction)) :*: S1 ('MetaSel ('Just "poriginal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Posting)))))))

data StorageFormat #

The id of a data format understood by hledger, eg `journal` or `csv`. The --output-format option selects one of these for output.

Constructors

Rules |
Journal' |
Ledger' |
Timeclock |
Timedot |
Sep SepFormat |

#### Instances

Instances details

Show StorageFormat # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> StorageFormat -> ShowS # show :: StorageFormat -> String # showList :: [StorageFormat] -> ShowS #
Eq StorageFormat # |
Instance details Defined in Hledger.Data.Types Methods (==) :: StorageFormat -> StorageFormat -> Bool # (/=) :: StorageFormat -> StorageFormat -> Bool #

data Transaction #

Constructors

Transaction |
Fields tindex :: Integer this transaction's 1-based position in the transaction stream, or 0 when not available tprecedingcomment :: Text any comment lines immediately preceding this transaction tsourcepos :: (SourcePos, SourcePos) the file position where the date starts, and where the last posting ends tdate :: Day tdate2 :: Maybe Day tstatus :: Status tcode :: Text tdescription :: Text tcomment :: Text this transaction's comment lines, as a single non-indented multi-line string ttags :: [Tag] tag names and values, extracted from the comment tpostings :: [Posting] this transaction's postings

#### Instances

Instances details

FromJSON Transaction # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Transaction # parseJSONList :: Value -> Parser [Transaction] # omittedField :: Maybe Transaction #
ToJSON Transaction # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Transaction -> Value # toEncoding :: Transaction -> Encoding # toJSONList :: [Transaction] -> Value # toEncodingList :: [Transaction] -> Encoding # omitField :: Transaction -> Bool #
Generic Transaction # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Transaction |
Instance details Defined in Hledger.Data.Types type Rep Transaction = D1 ('MetaData "Transaction" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Transaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tindex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "tprecedingcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourcePos, SourcePos)) :*: (S1 ('MetaSel ('Just "tdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just "tdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))))) :*: ((S1 ('MetaSel ('Just "tstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "tcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "tcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "tpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Posting]))))))
Methods from :: Transaction -> Rep Transaction x # to :: Rep Transaction x -> Transaction #
Show Transaction # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Transaction -> ShowS # show :: Transaction -> String # showList :: [Transaction] -> ShowS #
Eq Transaction # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Transaction -> Transaction -> Bool # (/=) :: Transaction -> Transaction -> Bool #
HasAmounts Transaction # |
Instance details Defined in Hledger.Data.Transaction Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Transaction -> Transaction #
HasAmounts AccountTransactionsReportItem # |
Instance details Defined in Hledger.Reports.AccountTransactionsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> AccountTransactionsReportItem -> AccountTransactionsReportItem #
type Rep Transaction # |
Instance details Defined in Hledger.Data.Types type Rep Transaction = D1 ('MetaData "Transaction" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Transaction" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tindex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "tprecedingcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SourcePos, SourcePos)) :*: (S1 ('MetaSel ('Just "tdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just "tdate2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))))) :*: ((S1 ('MetaSel ('Just "tstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "tcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tdescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "tcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "ttags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag]) :*: S1 ('MetaSel ('Just "tpostings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Posting]))))))

data TransactionModifier #

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 tmquerytxt :: Text tmpostingrules :: [TMPostingRule]

#### Instances

Instances details

ToJSON TransactionModifier # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: TransactionModifier -> Value # toEncoding :: TransactionModifier -> Encoding # toJSONList :: [TransactionModifier] -> Value # toEncodingList :: [TransactionModifier] -> Encoding # omitField :: TransactionModifier -> Bool #
Generic TransactionModifier # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep TransactionModifier |
Instance details Defined in Hledger.Data.Types type Rep TransactionModifier = D1 ('MetaData "TransactionModifier" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "TransactionModifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmquerytxt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tmpostingrules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TMPostingRule])))
Methods from :: TransactionModifier -> Rep TransactionModifier x # to :: Rep TransactionModifier x -> TransactionModifier #
Show TransactionModifier # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> TransactionModifier -> ShowS # show :: TransactionModifier -> String # showList :: [TransactionModifier] -> ShowS #
Eq TransactionModifier # |
Instance details Defined in Hledger.Data.Types Methods (==) :: TransactionModifier -> TransactionModifier -> Bool # (/=) :: TransactionModifier -> TransactionModifier -> Bool #
type Rep TransactionModifier # |
Instance details Defined in Hledger.Data.Types type Rep TransactionModifier = D1 ('MetaData "TransactionModifier" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "TransactionModifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmquerytxt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tmpostingrules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TMPostingRule])))

fromEFDay :: EFDay -> Day #

modifyEFDay :: (Day -> Day) -> EFDay -> EFDay #

type CommoditySymbol = Text #

data AmountPrecision #

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

Instances details

FromJSON AmountPrecision # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AmountPrecision # parseJSONList :: Value -> Parser [AmountPrecision] # omittedField :: Maybe AmountPrecision #
ToJSON AmountPrecision # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: AmountPrecision -> Value # toEncoding :: AmountPrecision -> Encoding # toJSONList :: [AmountPrecision] -> Value # toEncodingList :: [AmountPrecision] -> Encoding # omitField :: AmountPrecision -> Bool #
Generic AmountPrecision # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep AmountPrecision |
Instance details Defined in Hledger.Data.Types type Rep AmountPrecision = D1 ('MetaData "AmountPrecision" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Precision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)) :+: C1 ('MetaCons "NaturalPrecision" 'PrefixI 'False) (U1 :: Type -> Type))
Methods from :: AmountPrecision -> Rep AmountPrecision x # to :: Rep AmountPrecision x -> AmountPrecision #
Read AmountPrecision # |
Instance details Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AmountPrecision # readList :: ReadS [AmountPrecision] # readPrec :: ReadPrec AmountPrecision # readListPrec :: ReadPrec [AmountPrecision] #
Show AmountPrecision # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountPrecision -> ShowS # show :: AmountPrecision -> String # showList :: [AmountPrecision] -> ShowS #
Eq AmountPrecision # |
Instance details Defined in Hledger.Data.Types Methods (==) :: AmountPrecision -> AmountPrecision -> Bool # (/=) :: AmountPrecision -> AmountPrecision -> Bool #
Ord AmountPrecision # |
Instance details 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 #
type Rep AmountPrecision # |
Instance details Defined in Hledger.Data.Types type Rep AmountPrecision = D1 ('MetaData "AmountPrecision" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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 #

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 ascommodityside :: !Side show the symbol on the left or the right ? ascommodityspaced :: !Bool show a space between symbol and quantity ? asdigitgroups :: !(Maybe DigitGroupStyle) show the integer part with these digit group marks, or not asdecimalmark :: !(Maybe Char) show this character (should be . or ,) as decimal mark, or use the default (.) asprecision :: !AmountPrecision "display precision" - show this number of digits after the decimal point asrounding :: !Rounding "rounding strategy" - kept here for convenience, for now: when displaying an amount, it is ignored, but when applying this style to another amount, it determines how hard we should try to adjust that amount's display precision.

#### Instances

Instances details

FromJSON AmountStyle # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AmountStyle # parseJSONList :: Value -> Parser [AmountStyle] # omittedField :: Maybe AmountStyle #
ToJSON AmountStyle # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: AmountStyle -> Value # toEncoding :: AmountStyle -> Encoding # toJSONList :: [AmountStyle] -> Value # toEncodingList :: [AmountStyle] -> Encoding # omitField :: AmountStyle -> Bool #
Generic AmountStyle # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep AmountStyle |
Instance details Defined in Hledger.Data.Types type Rep AmountStyle = D1 ('MetaData "AmountStyle" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))))
Methods from :: AmountStyle -> Rep AmountStyle x # to :: Rep AmountStyle x -> AmountStyle #
Read AmountStyle # |
Instance details Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AmountStyle # readList :: ReadS [AmountStyle] # readPrec :: ReadPrec AmountStyle # readListPrec :: ReadPrec [AmountStyle] #
Show AmountStyle # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountStyle -> ShowS # show :: AmountStyle -> String # showList :: [AmountStyle] -> ShowS #
Eq AmountStyle # |
Instance details Defined in Hledger.Data.Types Methods (==) :: AmountStyle -> AmountStyle -> Bool # (/=) :: AmountStyle -> AmountStyle -> Bool #
Ord AmountStyle # |
Instance details 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 #
type Rep AmountStyle # |
Instance details Defined in Hledger.Data.Types type Rep AmountStyle = D1 ('MetaData "AmountStyle" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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 EFDay #

A date which is either exact or flexible. Flexible dates are allowed to be adjusted in certain situations.

Constructors

Exact Day |
Flex Day |

#### Instances

Instances details

ToJSON EFDay # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: EFDay -> Value # toEncoding :: EFDay -> Encoding # toJSONList :: [EFDay] -> Value # toEncodingList :: [EFDay] -> Encoding # omitField :: EFDay -> Bool #
Generic EFDay # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep EFDay |
Instance details Defined in Hledger.Data.Types type Rep EFDay = D1 ('MetaData "EFDay" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Exact" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "Flex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)))
Methods from :: EFDay -> Rep EFDay x # to :: Rep EFDay x -> EFDay #
Show EFDay # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> EFDay -> ShowS # show :: EFDay -> String # showList :: [EFDay] -> ShowS #
Eq EFDay # |
Instance details Defined in Hledger.Data.Types Methods (==) :: EFDay -> EFDay -> Bool # (/=) :: EFDay -> EFDay -> Bool #
Ord EFDay # |
Instance details Defined in Hledger.Data.Types Methods compare :: EFDay -> EFDay -> Ordering # (<) :: EFDay -> EFDay -> Bool # (<=) :: EFDay -> EFDay -> Bool # (>) :: EFDay -> EFDay -> Bool # (>=) :: EFDay -> EFDay -> Bool # max :: EFDay -> EFDay -> EFDay # min :: EFDay -> EFDay -> EFDay #
type Rep EFDay # |
Instance details Defined in Hledger.Data.Types type Rep EFDay = D1 ('MetaData "EFDay" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Exact" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "Flex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)))

type YearWeek = Int #

type MonthWeek = Int #

type WeekDay = Int #

data SmartDate #

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 an offset relative to the reference date: (last|this|next) (day|week|month|quarter|year), where "this" means the period containing the reference date.

Constructors

SmartCompleteDate Day |
SmartAssumeStart Year (Maybe Month) |
SmartFromReference (Maybe Month) MonthDay |
SmartMonth Month |
SmartRelative Integer SmartInterval |

#### Instances

Instances details

Show SmartDate # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> SmartDate -> ShowS # show :: SmartDate -> String # showList :: [SmartDate] -> ShowS #

data WhichDate #

Constructors

PrimaryDate |
SecondaryDate |

#### Instances

Instances details

Show WhichDate # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> WhichDate -> ShowS # show :: WhichDate -> String # showList :: [WhichDate] -> ShowS #
Eq WhichDate # |
Instance details Defined in Hledger.Data.Types Methods (==) :: WhichDate -> WhichDate -> Bool # (/=) :: WhichDate -> WhichDate -> Bool #

data DateSpan #

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.

Constructors

DateSpan (Maybe EFDay) (Maybe EFDay) |

#### Instances

Instances details

ToJSON DateSpan # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: DateSpan -> Value # toEncoding :: DateSpan -> Encoding # toJSONList :: [DateSpan] -> Value # toEncodingList :: [DateSpan] -> Encoding # omitField :: DateSpan -> Bool #
Default DateSpan # |
Instance details Defined in Hledger.Data.Types Methods def :: DateSpan #
Generic DateSpan # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep DateSpan |
Instance details Defined in Hledger.Data.Types type Rep DateSpan = D1 ('MetaData "DateSpan" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "DateSpan" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EFDay)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EFDay))))
Methods from :: DateSpan -> Rep DateSpan x # to :: Rep DateSpan x -> DateSpan #
Show DateSpan # |
Instance details Defined in Hledger.Data.Dates Methods showsPrec :: Int -> DateSpan -> ShowS # show :: DateSpan -> String # showList :: [DateSpan] -> ShowS #
Eq DateSpan # |
Instance details Defined in Hledger.Data.Types Methods (==) :: DateSpan -> DateSpan -> Bool # (/=) :: DateSpan -> DateSpan -> Bool #
Ord DateSpan # |
Instance details Defined in Hledger.Data.Types Methods compare :: DateSpan -> DateSpan -> Ordering # (<) :: DateSpan -> DateSpan -> Bool # (<=) :: DateSpan -> DateSpan -> Bool # (>) :: DateSpan -> DateSpan -> Bool # (>=) :: DateSpan -> DateSpan -> Bool # max :: DateSpan -> DateSpan -> DateSpan # min :: DateSpan -> DateSpan -> DateSpan #
type Rep DateSpan # |
Instance details Defined in Hledger.Data.Types type Rep DateSpan = D1 ('MetaData "DateSpan" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "DateSpan" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EFDay)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EFDay))))

type Payee = Text #

data DepthSpec #

Constructors

DepthSpec |
Fields dsFlatDepth :: Maybe Int dsRegexpDepths :: [(Regexp, Int)]

#### Instances

Instances details

Monoid DepthSpec # |
Instance details Defined in Hledger.Data.Types Methods mempty :: DepthSpec # mappend :: DepthSpec -> DepthSpec -> DepthSpec # mconcat :: [DepthSpec] -> DepthSpec #
Semigroup DepthSpec # |
Instance details Defined in Hledger.Data.Types Methods (<>) :: DepthSpec -> DepthSpec -> DepthSpec # sconcat :: NonEmpty DepthSpec -> DepthSpec # stimes :: Integral b => b -> DepthSpec -> DepthSpec #
Show DepthSpec # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> DepthSpec -> ShowS # show :: DepthSpec -> String # showList :: [DepthSpec] -> ShowS #
Eq DepthSpec # |
Instance details Defined in Hledger.Data.Types Methods (==) :: DepthSpec -> DepthSpec -> Bool # (/=) :: DepthSpec -> DepthSpec -> Bool #

isBalanceSheetAccountType :: AccountType -> Bool #

isIncomeStatementAccountType :: AccountType -> Bool #

isAccountSubtypeOf :: AccountType -> AccountType -> Bool #

Check whether the first argument is a subtype of the second: either equal or one of the defined subtypes.

data AccountAlias #

Constructors

BasicAlias AccountName AccountName |
RegexAlias Regexp Replacement |

#### Instances

Instances details

ToJSON AccountAlias # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: AccountAlias -> Value # toEncoding :: AccountAlias -> Encoding # toJSONList :: [AccountAlias] -> Value # toEncodingList :: [AccountAlias] -> Encoding # omitField :: AccountAlias -> Bool #
Generic AccountAlias # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep AccountAlias |
Instance details Defined in Hledger.Data.Types type Rep AccountAlias = D1 ('MetaData "AccountAlias" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "BasicAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName)) :+: C1 ('MetaCons "RegexAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Regexp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Replacement)))
Methods from :: AccountAlias -> Rep AccountAlias x # to :: Rep AccountAlias x -> AccountAlias #
Read AccountAlias # |
Instance details Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS AccountAlias # readList :: ReadS [AccountAlias] # readPrec :: ReadPrec AccountAlias # readListPrec :: ReadPrec [AccountAlias] #
Show AccountAlias # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountAlias -> ShowS # show :: AccountAlias -> String # showList :: [AccountAlias] -> ShowS #
Eq AccountAlias # |
Instance details Defined in Hledger.Data.Types Methods (==) :: AccountAlias -> AccountAlias -> Bool # (/=) :: AccountAlias -> AccountAlias -> Bool #
Ord AccountAlias # |
Instance details 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 #
type Rep AccountAlias # |
Instance details Defined in Hledger.Data.Types type Rep AccountAlias = D1 ('MetaData "AccountAlias" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "BasicAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName)) :+: C1 ('MetaCons "RegexAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Regexp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Replacement)))

type DecimalMark = Char #

One of the decimal marks we support: either period or comma.

isDecimalMark :: Char -> Bool #

type Quantity = Decimal #

The basic numeric type used in amounts.

data AmountCost #

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.

Constructors

UnitCost !Amount |
TotalCost !Amount |

#### Instances

Instances details

FromJSON AmountCost # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AmountCost # parseJSONList :: Value -> Parser [AmountCost] # omittedField :: Maybe AmountCost #
ToJSON AmountCost # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: AmountCost -> Value # toEncoding :: AmountCost -> Encoding # toJSONList :: [AmountCost] -> Value # toEncodingList :: [AmountCost] -> Encoding # omitField :: AmountCost -> Bool #
Generic AmountCost # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep AmountCost |
Instance details Defined in Hledger.Data.Types type Rep AmountCost = D1 ('MetaData "AmountCost" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))
Methods from :: AmountCost -> Rep AmountCost x # to :: Rep AmountCost x -> AmountCost #
Show AmountCost # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> AmountCost -> ShowS # show :: AmountCost -> String # showList :: [AmountCost] -> ShowS #
Eq AmountCost # |
Instance details Defined in Hledger.Data.Types Methods (==) :: AmountCost -> AmountCost -> Bool # (/=) :: AmountCost -> AmountCost -> Bool #
Ord AmountCost # |
Instance details 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 #
type Rep AmountCost # |
Instance details Defined in Hledger.Data.Types type Rep AmountCost = D1 ('MetaData "AmountCost" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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 DigitGroupStyle #

A style for displaying digit groups in the integer part of a floating point number. It consists of the character used to separate groups (comma or period, whichever is not used as decimal point), 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

Instances details

FromJSON DigitGroupStyle # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser DigitGroupStyle # parseJSONList :: Value -> Parser [DigitGroupStyle] # omittedField :: Maybe DigitGroupStyle #
ToJSON DigitGroupStyle # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: DigitGroupStyle -> Value # toEncoding :: DigitGroupStyle -> Encoding # toJSONList :: [DigitGroupStyle] -> Value # toEncodingList :: [DigitGroupStyle] -> Encoding # omitField :: DigitGroupStyle -> Bool #
Generic DigitGroupStyle # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep DigitGroupStyle |
Instance details Defined in Hledger.Data.Types type Rep DigitGroupStyle = D1 ('MetaData "DigitGroupStyle" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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])))
Methods from :: DigitGroupStyle -> Rep DigitGroupStyle x # to :: Rep DigitGroupStyle x -> DigitGroupStyle #
Read DigitGroupStyle # |
Instance details Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS DigitGroupStyle # readList :: ReadS [DigitGroupStyle] # readPrec :: ReadPrec DigitGroupStyle # readListPrec :: ReadPrec [DigitGroupStyle] #
Show DigitGroupStyle # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> DigitGroupStyle -> ShowS # show :: DigitGroupStyle -> String # showList :: [DigitGroupStyle] -> ShowS #
Eq DigitGroupStyle # |
Instance details Defined in Hledger.Data.Types Methods (==) :: DigitGroupStyle -> DigitGroupStyle -> Bool # (/=) :: DigitGroupStyle -> DigitGroupStyle -> Bool #
Ord DigitGroupStyle # |
Instance details 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 #
type Rep DigitGroupStyle # |
Instance details Defined in Hledger.Data.Types type Rep DigitGroupStyle = D1 ('MetaData "DigitGroupStyle" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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])))

data Rounding #

"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

Instances details

FromJSON Rounding # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser Rounding # parseJSONList :: Value -> Parser [Rounding] # omittedField :: Maybe Rounding #
ToJSON Rounding # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Rounding -> Value # toEncoding :: Rounding -> Encoding # toJSONList :: [Rounding] -> Value # toEncodingList :: [Rounding] -> Encoding # omitField :: Rounding -> Bool #
Generic Rounding # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Rounding |
Instance details Defined in Hledger.Data.Types type Rep Rounding = D1 ('MetaData "Rounding" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))
Methods from :: Rounding -> Rep Rounding x # to :: Rep Rounding x -> Rounding #
Read Rounding # |
Instance details Defined in Hledger.Data.Types Methods readsPrec :: Int -> ReadS Rounding # readList :: ReadS [Rounding] # readPrec :: ReadPrec Rounding # readListPrec :: ReadPrec [Rounding] #
Show Rounding # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Rounding -> ShowS # show :: Rounding -> String # showList :: [Rounding] -> ShowS #
Eq Rounding # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Rounding -> Rounding -> Bool # (/=) :: Rounding -> Rounding -> Bool #
Ord Rounding # |
Instance details Defined in Hledger.Data.Types Methods compare :: Rounding -> Rounding -> Ordering # (<) :: Rounding -> Rounding -> Bool # (<=) :: Rounding -> Rounding -> Bool # (>) :: Rounding -> Rounding -> Bool # (>=) :: Rounding -> Rounding -> Bool # max :: Rounding -> Rounding -> Rounding # min :: Rounding -> Rounding -> Rounding #
type Rep Rounding # |
Instance details Defined in Hledger.Data.Types type Rep Rounding = D1 ('MetaData "Rounding" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" '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)))

data Commodity #

Constructors

Commodity |
Fields csymbol :: CommoditySymbol cformat :: Maybe AmountStyle

#### Instances

Instances details

ToJSON Commodity # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: Commodity -> Value # toEncoding :: Commodity -> Encoding # toJSONList :: [Commodity] -> Value # toEncodingList :: [Commodity] -> Encoding # omitField :: Commodity -> Bool #
Generic Commodity # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep Commodity |
Instance details Defined in Hledger.Data.Types type Rep Commodity = D1 ('MetaData "Commodity" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Commodity" 'PrefixI 'True) (S1 ('MetaSel ('Just "csymbol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "cformat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AmountStyle))))
Methods from :: Commodity -> Rep Commodity x # to :: Rep Commodity x -> Commodity #
Show Commodity # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> Commodity -> ShowS # show :: Commodity -> String # showList :: [Commodity] -> ShowS #
Eq Commodity # |
Instance details Defined in Hledger.Data.Types Methods (==) :: Commodity -> Commodity -> Bool # (/=) :: Commodity -> Commodity -> Bool #
type Rep Commodity # |
Instance details Defined in Hledger.Data.Types type Rep Commodity = D1 ('MetaData "Commodity" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "Commodity" 'PrefixI 'True) (S1 ('MetaSel ('Just "csymbol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "cformat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AmountStyle))))

class HasAmounts a where #

Types with this class have one or more amounts, which can have display styles applied to them.

Methods

styleAmounts :: Map CommoditySymbol AmountStyle -> a -> a #

#### Instances

Instances details

HasAmounts Account # |
Instance details Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Account -> Account #
HasAmounts Amount # |
Instance details Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Amount -> Amount #
HasAmounts BalanceAssertion # |
Instance details Defined in Hledger.Data.Posting Methods styleAmounts :: Map CommoditySymbol AmountStyle -> BalanceAssertion -> BalanceAssertion #
HasAmounts MixedAmount # |
Instance details Defined in Hledger.Data.Amount Methods styleAmounts :: Map CommoditySymbol AmountStyle -> MixedAmount -> MixedAmount #
HasAmounts Posting # |
Instance details Defined in Hledger.Data.Posting Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Posting -> Posting #
HasAmounts Transaction # |
Instance details Defined in Hledger.Data.Transaction Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Transaction -> Transaction #
HasAmounts AccountTransactionsReportItem # |
Instance details Defined in Hledger.Reports.AccountTransactionsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> AccountTransactionsReportItem -> AccountTransactionsReportItem #
HasAmounts BalanceReportItem # |
Instance details Defined in Hledger.Reports.BalanceReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> BalanceReportItem -> BalanceReportItem #
HasAmounts PostingsReportItem # |
Instance details Defined in Hledger.Reports.PostingsReport Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PostingsReportItem -> PostingsReportItem #
HasAmounts a => HasAmounts (Maybe a) # |
Instance details Defined in Hledger.Data.Types Methods styleAmounts :: Map CommoditySymbol AmountStyle -> Maybe a -> Maybe a #
HasAmounts a => HasAmounts [a] # |
Instance details Defined in Hledger.Data.Types Methods styleAmounts :: Map CommoditySymbol AmountStyle -> [a] -> [a] #
HasAmounts b => HasAmounts (CompoundPeriodicReport a b) # |
Instance details Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> CompoundPeriodicReport a b -> CompoundPeriodicReport a b #
HasAmounts b => HasAmounts (PeriodicReport a b) # |
Instance details Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PeriodicReport a b -> PeriodicReport a b #
HasAmounts b => HasAmounts (PeriodicReportRow a b) # |
Instance details Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> PeriodicReportRow a b -> PeriodicReportRow a b #
(HasAmounts a, HasAmounts b) => HasAmounts (a, b) # |
Instance details Defined in Hledger.Data.Types Methods styleAmounts :: Map CommoditySymbol AmountStyle -> (a, b) -> (a, b) #
HasAmounts b => HasAmounts (Text, PeriodicReport a b, Bool) # |
Instance details Defined in Hledger.Reports.ReportTypes Methods styleAmounts :: Map CommoditySymbol AmountStyle -> (Text, PeriodicReport a b, Bool) -> (Text, PeriodicReport a b, Bool) #

maCompare :: MixedAmount -> MixedAmount -> Ordering #

Compare two MixedAmounts, substituting 0 for the quantity of any missing commodities in either.

data PostingType #

Constructors

RegularPosting |
VirtualPosting |
BalancedVirtualPosting |

#### Instances

Instances details

FromJSON PostingType # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser PostingType # parseJSONList :: Value -> Parser [PostingType] # omittedField :: Maybe PostingType #
ToJSON PostingType # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: PostingType -> Value # toEncoding :: PostingType -> Encoding # toJSONList :: [PostingType] -> Value # toEncodingList :: [PostingType] -> Encoding # omitField :: PostingType -> Bool #
Generic PostingType # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep PostingType |
Instance details Defined in Hledger.Data.Types type Rep PostingType = D1 ('MetaData "PostingType" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "RegularPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BalancedVirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type)))
Methods from :: PostingType -> Rep PostingType x # to :: Rep PostingType x -> PostingType #
Show PostingType # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> PostingType -> ShowS # show :: PostingType -> String # showList :: [PostingType] -> ShowS #
Eq PostingType # |
Instance details Defined in Hledger.Data.Types Methods (==) :: PostingType -> PostingType -> Bool # (/=) :: PostingType -> PostingType -> Bool #
type Rep PostingType # |
Instance details Defined in Hledger.Data.Types type Rep PostingType = D1 ('MetaData "PostingType" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "RegularPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BalancedVirtualPosting" 'PrefixI 'False) (U1 :: Type -> Type)))

type TagName = Text #

type TagValue = Text #

type HiddenTag #

Arguments

= Tag | A tag whose name begins with _.

type DateTag = (TagName, Day) #

toHiddenTag :: Tag -> HiddenTag #

Add the _ prefix to a normal visible tag's name, making it a hidden tag.

toHiddenTagName :: TagName -> TagName #

Add the _ prefix to a normal visible tag's name, making it a hidden tag.

toVisibleTag :: HiddenTag -> Tag #

Drop the _ prefix from a hidden tag's name, making it a normal visible tag.

toVisibleTagName :: TagName -> TagName #

Drop the _ prefix from a hidden tag's name, making it a normal visible tag.

isHiddenTagName :: TagName -> Bool #

Does this tag name begin with the hidden tag prefix (_) ?

nullsourcepos :: SourcePos #

nullsourcepospair :: (SourcePos, SourcePos) #

data BalanceAssertion #

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 baamount :: Amount the expected balance in a particular commodity batotal :: Bool disallow additional non-asserted commodities ? bainclusive :: Bool include subaccounts when calculating the actual balance ? baposition :: SourcePos the assertion's file position, for error reporting

#### Instances

Instances details

FromJSON BalanceAssertion # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser BalanceAssertion # parseJSONList :: Value -> Parser [BalanceAssertion] # omittedField :: Maybe BalanceAssertion #
ToJSON BalanceAssertion # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: BalanceAssertion -> Value # toEncoding :: BalanceAssertion -> Encoding # toJSONList :: [BalanceAssertion] -> Value # toEncodingList :: [BalanceAssertion] -> Encoding # omitField :: BalanceAssertion -> Bool #
Generic BalanceAssertion # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep BalanceAssertion |
Instance details Defined in Hledger.Data.Types type Rep BalanceAssertion = D1 ('MetaData "BalanceAssertion" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "BalanceAssertion" 'PrefixI 'True) ((S1 ('MetaSel ('Just "baamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount) :*: S1 ('MetaSel ('Just "batotal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "bainclusive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "baposition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos))))
Methods from :: BalanceAssertion -> Rep BalanceAssertion x # to :: Rep BalanceAssertion x -> BalanceAssertion #
Show BalanceAssertion # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> BalanceAssertion -> ShowS # show :: BalanceAssertion -> String # showList :: [BalanceAssertion] -> ShowS #
Eq BalanceAssertion # |
Instance details Defined in Hledger.Data.Types Methods (==) :: BalanceAssertion -> BalanceAssertion -> Bool # (/=) :: BalanceAssertion -> BalanceAssertion -> Bool #
HasAmounts BalanceAssertion # |
Instance details Defined in Hledger.Data.Posting Methods styleAmounts :: Map CommoditySymbol AmountStyle -> BalanceAssertion -> BalanceAssertion #
type Rep BalanceAssertion # |
Instance details Defined in Hledger.Data.Types type Rep BalanceAssertion = D1 ('MetaData "BalanceAssertion" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "BalanceAssertion" 'PrefixI 'True) ((S1 ('MetaSel ('Just "baamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount) :*: S1 ('MetaSel ('Just "batotal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "bainclusive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "baposition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos))))

data TMPostingRule #

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 tmprPosting :: Posting tmprIsMultiplier :: Bool

#### Instances

Instances details

ToJSON TMPostingRule # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: TMPostingRule -> Value # toEncoding :: TMPostingRule -> Encoding # toJSONList :: [TMPostingRule] -> Value # toEncodingList :: [TMPostingRule] -> Encoding # omitField :: TMPostingRule -> Bool #
Generic TMPostingRule # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep TMPostingRule |
Instance details Defined in Hledger.Data.Types type Rep TMPostingRule = D1 ('MetaData "TMPostingRule" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "TMPostingRule" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmprPosting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Posting) :*: S1 ('MetaSel ('Just "tmprIsMultiplier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
Methods from :: TMPostingRule -> Rep TMPostingRule x # to :: Rep TMPostingRule x -> TMPostingRule #
Show TMPostingRule # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> TMPostingRule -> ShowS # show :: TMPostingRule -> String # showList :: [TMPostingRule] -> ShowS #
Eq TMPostingRule # |
Instance details Defined in Hledger.Data.Types Methods (==) :: TMPostingRule -> TMPostingRule -> Bool # (/=) :: TMPostingRule -> TMPostingRule -> Bool #
type Rep TMPostingRule # |
Instance details Defined in Hledger.Data.Types type Rep TMPostingRule = D1 ('MetaData "TMPostingRule" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "TMPostingRule" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmprPosting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Posting) :*: S1 ('MetaSel ('Just "tmprIsMultiplier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

nulltransactionmodifier :: TransactionModifier #

nullperiodictransaction :: PeriodicTransaction #

data TimeclockEntry #

Constructors

TimeclockEntry |
Fields tlsourcepos :: SourcePos tlcode :: TimeclockCode tldatetime :: LocalTime tlaccount :: AccountName tldescription :: Text tlcomment :: Text tltags :: [Tag]

#### Instances

Instances details

ToJSON TimeclockEntry # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: TimeclockEntry -> Value # toEncoding :: TimeclockEntry -> Encoding # toJSONList :: [TimeclockEntry] -> Value # toEncodingList :: [TimeclockEntry] -> Encoding # omitField :: TimeclockEntry -> Bool #
Generic TimeclockEntry # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep TimeclockEntry |
Instance details Defined in Hledger.Data.Types type Rep TimeclockEntry = D1 ('MetaData "TimeclockEntry" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "TimeclockEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tlsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "tlcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TimeclockCode) :*: S1 ('MetaSel ('Just "tldatetime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalTime))) :*: ((S1 ('MetaSel ('Just "tlaccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "tldescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tlcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tltags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])))))
Methods from :: TimeclockEntry -> Rep TimeclockEntry x # to :: Rep TimeclockEntry x -> TimeclockEntry #
Show TimeclockEntry # |
Instance details Defined in Hledger.Data.Timeclock Methods showsPrec :: Int -> TimeclockEntry -> ShowS # show :: TimeclockEntry -> String # showList :: [TimeclockEntry] -> ShowS #
Eq TimeclockEntry # |
Instance details Defined in Hledger.Data.Types Methods (==) :: TimeclockEntry -> TimeclockEntry -> Bool # (/=) :: TimeclockEntry -> TimeclockEntry -> Bool #
Ord TimeclockEntry # |
Instance details 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 #
type Rep TimeclockEntry # |
Instance details Defined in Hledger.Data.Types type Rep TimeclockEntry = D1 ('MetaData "TimeclockEntry" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "TimeclockEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tlsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "tlcode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TimeclockCode) :*: S1 ('MetaSel ('Just "tldatetime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalTime))) :*: ((S1 ('MetaSel ('Just "tlaccount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Just "tldescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tlcomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tltags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])))))

data PriceDirective #

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 pdsourcepos :: SourcePos pddate :: Day pdcommodity :: CommoditySymbol pdamount :: Amount

#### Instances

Instances details

ToJSON PriceDirective # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: PriceDirective -> Value # toEncoding :: PriceDirective -> Encoding # toJSONList :: [PriceDirective] -> Value # toEncodingList :: [PriceDirective] -> Encoding # omitField :: PriceDirective -> Bool #
Generic PriceDirective # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep PriceDirective |
Instance details Defined in Hledger.Data.Types type Rep PriceDirective = D1 ('MetaData "PriceDirective" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "PriceDirective" 'PrefixI 'True) ((S1 ('MetaSel ('Just "pdsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "pddate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :*: (S1 ('MetaSel ('Just "pdcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "pdamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount))))
Methods from :: PriceDirective -> Rep PriceDirective x # to :: Rep PriceDirective x -> PriceDirective #
Show PriceDirective # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> PriceDirective -> ShowS # show :: PriceDirective -> String # showList :: [PriceDirective] -> ShowS #
Eq PriceDirective # |
Instance details Defined in Hledger.Data.Types Methods (==) :: PriceDirective -> PriceDirective -> Bool # (/=) :: PriceDirective -> PriceDirective -> Bool #
Ord PriceDirective # |
Instance details 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 #
type Rep PriceDirective # |
Instance details Defined in Hledger.Data.Types type Rep PriceDirective = D1 ('MetaData "PriceDirective" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "PriceDirective" 'PrefixI 'True) ((S1 ('MetaSel ('Just "pdsourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "pddate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :*: (S1 ('MetaSel ('Just "pdcommodity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "pdamount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount))))

data MarketPrice #

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 mpdate :: Day Date on which this price becomes effective. mpfrom :: CommoditySymbol The commodity being converted from. mpto :: CommoditySymbol The commodity being converted to. mprate :: Quantity One unit of the "from" commodity is worth this quantity of the "to" commodity.

#### Instances

Instances details

FromJSON MarketPrice # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser MarketPrice # parseJSONList :: Value -> Parser [MarketPrice] # omittedField :: Maybe MarketPrice #
ToJSON MarketPrice # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: MarketPrice -> Value # toEncoding :: MarketPrice -> Encoding # toJSONList :: [MarketPrice] -> Value # toEncodingList :: [MarketPrice] -> Encoding # omitField :: MarketPrice -> Bool #
Generic MarketPrice # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep MarketPrice |
Instance details Defined in Hledger.Data.Types type Rep MarketPrice = D1 ('MetaData "MarketPrice" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "MarketPrice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mpdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just "mpfrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol)) :*: (S1 ('MetaSel ('Just "mpto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "mprate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quantity))))
Methods from :: MarketPrice -> Rep MarketPrice x # to :: Rep MarketPrice x -> MarketPrice #
Show MarketPrice # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> MarketPrice -> ShowS # show :: MarketPrice -> String # showList :: [MarketPrice] -> ShowS #
Eq MarketPrice # |
Instance details Defined in Hledger.Data.Types Methods (==) :: MarketPrice -> MarketPrice -> Bool # (/=) :: MarketPrice -> MarketPrice -> Bool #
Ord MarketPrice # |
Instance details 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 #
type Rep MarketPrice # |
Instance details Defined in Hledger.Data.Types type Rep MarketPrice = D1 ('MetaData "MarketPrice" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "MarketPrice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mpdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day) :*: S1 ('MetaSel ('Just "mpfrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol)) :*: (S1 ('MetaSel ('Just "mpto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommoditySymbol) :*: S1 ('MetaSel ('Just "mprate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quantity))))

showMarketPrice :: MarketPrice -> String #

showMarketPrices :: [MarketPrice] -> [Char] #

data PayeeDeclarationInfo #

Extra information found in a payee directive.

Constructors

PayeeDeclarationInfo |
Fields pdicomment :: Text any comment lines following the payee directive pditags :: [Tag] tags extracted from the comment, if any

#### Instances

Instances details

ToJSON PayeeDeclarationInfo # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: PayeeDeclarationInfo -> Value # toEncoding :: PayeeDeclarationInfo -> Encoding # toJSONList :: [PayeeDeclarationInfo] -> Value # toEncodingList :: [PayeeDeclarationInfo] -> Encoding # omitField :: PayeeDeclarationInfo -> Bool #
Generic PayeeDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep PayeeDeclarationInfo |
Instance details Defined in Hledger.Data.Types type Rep PayeeDeclarationInfo = D1 ('MetaData "PayeeDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "PayeeDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "pdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "pditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])))
Methods from :: PayeeDeclarationInfo -> Rep PayeeDeclarationInfo x # to :: Rep PayeeDeclarationInfo x -> PayeeDeclarationInfo #
Show PayeeDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> PayeeDeclarationInfo -> ShowS # show :: PayeeDeclarationInfo -> String # showList :: [PayeeDeclarationInfo] -> ShowS #
Eq PayeeDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Methods (==) :: PayeeDeclarationInfo -> PayeeDeclarationInfo -> Bool # (/=) :: PayeeDeclarationInfo -> PayeeDeclarationInfo -> Bool #
type Rep PayeeDeclarationInfo # |
Instance details Defined in Hledger.Data.Types type Rep PayeeDeclarationInfo = D1 ('MetaData "PayeeDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "PayeeDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "pdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "pditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])))

newtype TagDeclarationInfo #

Extra information found in a tag directive.

Constructors

TagDeclarationInfo |
Fields tdicomment :: Text any comment lines following the tag directive. No tags allowed here.

#### Instances

Instances details

ToJSON TagDeclarationInfo # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: TagDeclarationInfo -> Value # toEncoding :: TagDeclarationInfo -> Encoding # toJSONList :: [TagDeclarationInfo] -> Value # toEncodingList :: [TagDeclarationInfo] -> Encoding # omitField :: TagDeclarationInfo -> Bool #
Generic TagDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep TagDeclarationInfo |
Instance details Defined in Hledger.Data.Types type Rep TagDeclarationInfo = D1 ('MetaData "TagDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'True) (C1 ('MetaCons "TagDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "tdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Methods from :: TagDeclarationInfo -> Rep TagDeclarationInfo x # to :: Rep TagDeclarationInfo x -> TagDeclarationInfo #
Show TagDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> TagDeclarationInfo -> ShowS # show :: TagDeclarationInfo -> String # showList :: [TagDeclarationInfo] -> ShowS #
Eq TagDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Methods (==) :: TagDeclarationInfo -> TagDeclarationInfo -> Bool # (/=) :: TagDeclarationInfo -> TagDeclarationInfo -> Bool #
type Rep TagDeclarationInfo # |
Instance details Defined in Hledger.Data.Types type Rep TagDeclarationInfo = D1 ('MetaData "TagDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'True) (C1 ('MetaCons "TagDeclarationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "tdicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data AccountDeclarationInfo #

Extra information about an account that can be derived from its account directive (and the other account directives).

Constructors

AccountDeclarationInfo |
Fields adicomment :: Text any comment lines following an account directive for this account aditags :: [Tag] tags extracted from the account comment, if any adideclarationorder :: Int the order in which this account was declared, relative to other account declarations, during parsing (1..) adisourcepos :: SourcePos source file and position

#### Instances

Instances details

FromJSON AccountDeclarationInfo # |
Instance details Defined in Hledger.Data.Json Methods parseJSON :: Value -> Parser AccountDeclarationInfo # parseJSONList :: Value -> Parser [AccountDeclarationInfo] # omittedField :: Maybe AccountDeclarationInfo #
ToJSON AccountDeclarationInfo # |
Instance details Defined in Hledger.Data.Json Methods toJSON :: AccountDeclarationInfo -> Value # toEncoding :: AccountDeclarationInfo -> Encoding # toJSONList :: [AccountDeclarationInfo] -> Value # toEncodingList :: [AccountDeclarationInfo] -> Encoding # omitField :: AccountDeclarationInfo -> Bool #
Generic AccountDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Associated Types
type Rep AccountDeclarationInfo |
Instance details Defined in Hledger.Data.Types type Rep AccountDeclarationInfo = D1 ('MetaData "AccountDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "AccountDeclarationInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "adicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "aditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])) :*: (S1 ('MetaSel ('Just "adideclarationorder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "adisourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos))))
Methods from :: AccountDeclarationInfo -> Rep AccountDeclarationInfo x # to :: Rep AccountDeclarationInfo x -> AccountDeclarationInfo #
Show AccountDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> AccountDeclarationInfo -> ShowS # show :: AccountDeclarationInfo -> String # showList :: [AccountDeclarationInfo] -> ShowS #
Eq AccountDeclarationInfo # |
Instance details Defined in Hledger.Data.Types Methods (==) :: AccountDeclarationInfo -> AccountDeclarationInfo -> Bool # (/=) :: AccountDeclarationInfo -> AccountDeclarationInfo -> Bool #
type Rep AccountDeclarationInfo # |
Instance details Defined in Hledger.Data.Types type Rep AccountDeclarationInfo = D1 ('MetaData "AccountDeclarationInfo" "Hledger.Data.Types" "hledger-lib-1.41-GLId5wZLh0tCTlbBQ6Z8jY" 'False) (C1 ('MetaCons "AccountDeclarationInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "adicomment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "aditags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tag])) :*: (S1 ('MetaSel ('Just "adideclarationorder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "adisourcepos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos))))

type ParsedJournal = Journal #

A journal in the process of being parsed, not yet finalised. The data is partial, and list fields are in reverse order.

nullpayeedeclarationinfo :: PayeeDeclarationInfo #

nulltagdeclarationinfo :: TagDeclarationInfo #

nullaccountdeclarationinfo :: AccountDeclarationInfo #

data NormalSign #

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

Instances details

Show NormalSign # |
Instance details Defined in Hledger.Data.Types Methods showsPrec :: Int -> NormalSign -> ShowS # show :: NormalSign -> String # showList :: [NormalSign] -> ShowS #
Eq NormalSign # |
Instance details Defined in Hledger.Data.Types Methods (==) :: NormalSign -> NormalSign -> Bool # (/=) :: NormalSign -> NormalSign -> Bool #

type Year = Integer #

Year of Common Era (when positive).

# Orphan instances

ToMarkup Quantity # |
Instance details Methods toMarkup :: Quantity -> Markup # preEscapedToMarkup :: Quantity -> Markup #
Generic (DecimalRaw a) # |
Instance details Associated Types
type Rep (DecimalRaw a) |
Instance details Defined in Hledger.Data.Types type Rep (DecimalRaw a) = D1 ('MetaData "DecimalRaw" "Data.Decimal" "Decimal-0.5.2-JUg6EKS3qNo86XWBeZBmvM" 'False) (C1 ('MetaCons "Decimal" 'PrefixI 'True) (S1 ('MetaSel ('Just "decimalPlaces") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word8) :*: S1 ('MetaSel ('Just "decimalMantissa") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))
Methods from :: DecimalRaw a -> Rep (DecimalRaw a) x # to :: Rep (DecimalRaw a) x -> DecimalRaw a #