hledger-lib-1.3: Core data types, parsers and functionality for the hledger accounting tools

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

- type SmartDate = (String, String, String)
- data WhichDate
  - = PrimaryDate
  - | SecondaryDate
- data DateSpan = DateSpan (Maybe Day) (Maybe Day)
- type Year = Integer
- type Month = Int
- type Quarter = Int
- type YearWeek = Int
- type MonthWeek = Int
- type YearDay = Int
- type MonthDay = Int
- type WeekDay = Int
- data Period
  - = DayPeriod Day
  - | WeekPeriod Day
  - | MonthPeriod Year Month
  - | QuarterPeriod Year Quarter
  - | YearPeriod Year
  - | PeriodBetween Day Day
  - | PeriodFrom Day
  - | PeriodTo Day
  - | PeriodAll
- data Interval
  - = NoInterval
  - | Days Int
  - | Weeks Int
  - | Months Int
  - | Quarters Int
  - | Years Int
  - | DayOfMonth Int
  - | DayOfWeek Int
- type AccountName = Text
- data AccountAlias
  - = BasicAlias AccountName AccountName
  - | RegexAlias Regexp Replacement
- data Side
  - = L
  - | R
- type Quantity = Decimal
- data Price
  - = NoPrice
  - | UnitPrice Amount
  - | TotalPrice Amount
- data AmountStyle = AmountStyle {
  - ascommodityside :: Side
  - ascommodityspaced :: Bool
  - asprecision :: !Int
  - asdecimalpoint :: Maybe Char
  - asdigitgroups :: Maybe DigitGroupStyle
  }
- data DigitGroupStyle = DigitGroups Char [Int]
- type CommoditySymbol = Text
- data Commodity = Commodity {
  - csymbol :: CommoditySymbol
  - cformat :: Maybe AmountStyle
  }
- data Amount = Amount {
  - acommodity :: CommoditySymbol
  - aquantity :: Quantity
  - aprice :: Price
  - astyle :: AmountStyle
  - amultiplier :: Bool
  }
- newtype MixedAmount = Mixed [Amount]
- data PostingType
  - = RegularPosting
  - | VirtualPosting
  - | BalancedVirtualPosting
- type TagName = Text
- type TagValue = Text
- type Tag = (TagName, TagValue)
- data Status
  - = Unmarked
  - | Pending
  - | Cleared
- data Posting = Posting {
  - pdate :: Maybe Day
  - pdate2 :: Maybe Day
  - pstatus :: Status
  - paccount :: AccountName
  - pamount :: MixedAmount
  - pcomment :: Text
  - ptype :: PostingType
  - ptags :: [Tag]
  - pbalanceassertion :: Maybe Amount
  - ptransaction :: Maybe Transaction
  - porigin :: Maybe Posting
  }
- data GenericSourcePos
  - = GenericSourcePos FilePath Int Int
  - | JournalSourcePos FilePath (Int, Int)
- data Transaction = Transaction {
  - tindex :: Integer
  - tsourcepos :: GenericSourcePos
  - tdate :: Day
  - tdate2 :: Maybe Day
  - tstatus :: Status
  - tcode :: Text
  - tdescription :: Text
  - tcomment :: Text
  - ttags :: [Tag]
  - tpostings :: [Posting]
  - tpreceding_comment_lines :: Text
  }
- data ModifierTransaction = ModifierTransaction {
  - mtvalueexpr :: Text
  - mtpostings :: [Posting]
  }
- data PeriodicTransaction = PeriodicTransaction {
  - ptperiodicexpr :: Text
  - ptpostings :: [Posting]
  }
- data TimeclockCode
  - = SetBalance
  - | SetRequiredHours
  - | In
  - | Out
  - | FinalOut
- data TimeclockEntry = TimeclockEntry {
  - tlsourcepos :: GenericSourcePos
  - tlcode :: TimeclockCode
  - tldatetime :: LocalTime
  - tlaccount :: AccountName
  - tldescription :: Text
  }
- data MarketPrice = MarketPrice {
  - mpdate :: Day
  - mpcommodity :: CommoditySymbol
  - mpamount :: Amount
  }
- data Journal = Journal {
  - jparsedefaultyear :: Maybe Year
  - jparsedefaultcommodity :: Maybe (CommoditySymbol, AmountStyle)
  - jparseparentaccounts :: [AccountName]
  - jparsealiases :: [AccountAlias]
  - jparsetimeclockentries :: [TimeclockEntry]
  - jaccounts :: [AccountName]
  - jcommodities :: Map CommoditySymbol Commodity
  - jinferredcommodities :: Map CommoditySymbol AmountStyle
  - jmarketprices :: [MarketPrice]
  - jmodifiertxns :: [ModifierTransaction]
  - jperiodictxns :: [PeriodicTransaction]
  - jtxns :: [Transaction]
  - jfinalcommentlines :: Text
  - jfiles :: [(FilePath, Text)]
  - jlastreadtime :: ClockTime
  }
- type ParsedJournal = Journal
- type StorageFormat = String
- data Reader = Reader {
  - rFormat :: StorageFormat
  - rExtensions :: [String]
  - rParser :: Maybe FilePath -> Bool -> FilePath -> Text -> ExceptT String IO Journal
  - rExperimental :: Bool
  }
- data Account = Account {
  - aname :: AccountName
  - aebalance :: MixedAmount
  - asubs :: [Account]
  - anumpostings :: Int
  - aibalance :: MixedAmount
  - aparent :: Maybe Account
  - aboring :: Bool
  }
- data Ledger = Ledger {
  - ljournal :: Journal
  - laccounts :: [Account]
  }

# Documentation

type SmartDate = (String, String, String) #

data WhichDate #

Constructors

PrimaryDate |
SecondaryDate |

Instances

Eq WhichDate # |
Methods (==) :: WhichDate -> WhichDate -> Bool # (/=) :: WhichDate -> WhichDate -> Bool #
Show WhichDate # |
Methods showsPrec :: Int -> WhichDate -> ShowS # show :: WhichDate -> String # showList :: [WhichDate] -> ShowS #

data DateSpan #

Constructors

DateSpan (Maybe Day) (Maybe Day) |

Instances

Eq DateSpan # |
Methods (==) :: DateSpan -> DateSpan -> Bool # (/=) :: DateSpan -> DateSpan -> Bool #
Data DateSpan # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DateSpan -> c DateSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DateSpan # toConstr :: DateSpan -> Constr # dataTypeOf :: DateSpan -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DateSpan) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateSpan) # gmapT :: (forall b. Data b => b -> b) -> DateSpan -> DateSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DateSpan -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DateSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> DateSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DateSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DateSpan -> m DateSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DateSpan -> m DateSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DateSpan -> m DateSpan #
Ord DateSpan # |
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 #
Generic DateSpan # |
Associated Types type Rep DateSpan :: * -> * # Methods from :: DateSpan -> Rep DateSpan x # to :: Rep DateSpan x -> DateSpan #
NFData DateSpan # |
Methods rnf :: DateSpan -> () #
type Rep DateSpan # |
type Rep DateSpan = D1 (MetaData "DateSpan" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "DateSpan" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Day))) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Day)))))

type Year = Integer #

type Month = Int #

type Quarter = Int #

type YearWeek = Int #

type MonthWeek = Int #

type YearDay = Int #

type MonthDay = Int #

type WeekDay = Int #

data Period #

Constructors

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

Instances

Eq Period # |
Methods (==) :: Period -> Period -> Bool # (/=) :: Period -> Period -> Bool #
Data Period # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Period -> c Period # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Period # toConstr :: Period -> Constr # dataTypeOf :: Period -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Period) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Period) # gmapT :: (forall b. Data b => b -> b) -> Period -> Period # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Period -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Period -> r # gmapQ :: (forall d. Data d => d -> u) -> Period -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Period -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Period -> m Period # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Period -> m Period # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Period -> m Period #
Ord Period # |
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 #
Show Period # |
Methods showsPrec :: Int -> Period -> ShowS # show :: Period -> String # showList :: [Period] -> ShowS #
Generic Period # |
Associated Types type Rep Period :: * -> * # Methods from :: Period -> Rep Period x # to :: Rep Period x -> Period #
Default Period # |
Methods def :: Period #
type Rep Period # |
type Rep Period = D1 (MetaData "Period" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "DayPeriod" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day))) (C1 (MetaCons "WeekPeriod" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day)))) ((:+:) (C1 (MetaCons "MonthPeriod" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Year)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Month)))) (C1 (MetaCons "QuarterPeriod" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Year)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Quarter)))))) ((:+:) ((:+:) (C1 (MetaCons "YearPeriod" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Year))) (C1 (MetaCons "PeriodBetween" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day))))) ((:+:) (C1 (MetaCons "PeriodFrom" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day))) ((:+:) (C1 (MetaCons "PeriodTo" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day))) (C1 (MetaCons "PeriodAll" PrefixI False) U1)))))

data Interval #

Constructors

NoInterval |
Days Int |
Weeks Int |
Months Int |
Quarters Int |
Years Int |
DayOfMonth Int |
DayOfWeek Int |

Instances

Eq Interval # |
Methods (==) :: Interval -> Interval -> Bool # (/=) :: Interval -> Interval -> Bool #
Data Interval # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Interval -> c Interval # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Interval # toConstr :: Interval -> Constr # dataTypeOf :: Interval -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Interval) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Interval) # gmapT :: (forall b. Data b => b -> b) -> Interval -> Interval # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Interval -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Interval -> r # gmapQ :: (forall d. Data d => d -> u) -> Interval -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Interval -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Interval -> m Interval # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Interval -> m Interval # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Interval -> m Interval #
Ord Interval # |
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 #
Show Interval # |
Methods showsPrec :: Int -> Interval -> ShowS # show :: Interval -> String # showList :: [Interval] -> ShowS #
Generic Interval # |
Associated Types type Rep Interval :: * -> * # Methods from :: Interval -> Rep Interval x # to :: Rep Interval x -> Interval #
Default Interval # |
Methods def :: Interval #
NFData Interval # |
Methods rnf :: Interval -> () #
type Rep Interval # |
type Rep Interval = D1 (MetaData "Interval" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NoInterval" PrefixI False) U1) (C1 (MetaCons "Days" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))) ((:+:) (C1 (MetaCons "Weeks" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) (C1 (MetaCons "Months" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))) ((:+:) ((:+:) (C1 (MetaCons "Quarters" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) (C1 (MetaCons "Years" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))) ((:+:) (C1 (MetaCons "DayOfMonth" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) (C1 (MetaCons "DayOfWeek" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))))

type AccountName = Text #

data AccountAlias #

Constructors

BasicAlias AccountName AccountName |
RegexAlias Regexp Replacement |

Instances

Eq AccountAlias # |
Methods (==) :: AccountAlias -> AccountAlias -> Bool # (/=) :: AccountAlias -> AccountAlias -> Bool #
Data AccountAlias # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AccountAlias -> c AccountAlias # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AccountAlias # toConstr :: AccountAlias -> Constr # dataTypeOf :: AccountAlias -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AccountAlias) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AccountAlias) # gmapT :: (forall b. Data b => b -> b) -> AccountAlias -> AccountAlias # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AccountAlias -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AccountAlias -> r # gmapQ :: (forall d. Data d => d -> u) -> AccountAlias -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AccountAlias -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AccountAlias -> m AccountAlias # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AccountAlias -> m AccountAlias # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AccountAlias -> m AccountAlias #
Ord AccountAlias # |
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 #
Read AccountAlias # |
Methods readsPrec :: Int -> ReadS AccountAlias # readList :: ReadS [AccountAlias] # readPrec :: ReadPrec AccountAlias # readListPrec :: ReadPrec [AccountAlias] #
Show AccountAlias # |
Methods showsPrec :: Int -> AccountAlias -> ShowS # show :: AccountAlias -> String # showList :: [AccountAlias] -> ShowS #
Generic AccountAlias # |
Associated Types type Rep AccountAlias :: * -> * # Methods from :: AccountAlias -> Rep AccountAlias x # to :: Rep AccountAlias x -> AccountAlias #
NFData AccountAlias # |
Methods rnf :: AccountAlias -> () #
type Rep AccountAlias # |
type Rep AccountAlias = D1 (MetaData "AccountAlias" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) (C1 (MetaCons "BasicAlias" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AccountName)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AccountName)))) (C1 (MetaCons "RegexAlias" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Regexp)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Replacement)))))

data Side #

Constructors

L |
R |

Instances

Eq Side # |
Methods (==) :: Side -> Side -> Bool # (/=) :: Side -> Side -> Bool #
Data Side # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Side -> c Side # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Side # toConstr :: Side -> Constr # dataTypeOf :: Side -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Side) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Side) # gmapT :: (forall b. Data b => b -> b) -> Side -> Side # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Side -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Side -> r # gmapQ :: (forall d. Data d => d -> u) -> Side -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Side -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Side -> m Side # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Side -> m Side # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Side -> m Side #
Ord Side # |
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 #
Read Side # |
Methods readsPrec :: Int -> ReadS Side # readList :: ReadS [Side] # readPrec :: ReadPrec Side # readListPrec :: ReadPrec [Side] #
Show Side # |
Methods showsPrec :: Int -> Side -> ShowS # show :: Side -> String # showList :: [Side] -> ShowS #
Generic Side # |
Associated Types type Rep Side :: * -> * # Methods from :: Side -> Rep Side x # to :: Rep Side x -> Side #
NFData Side # |
Methods rnf :: Side -> () #
type Rep Side # |
type Rep Side = D1 (MetaData "Side" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) (C1 (MetaCons "L" PrefixI False) U1) (C1 (MetaCons "R" PrefixI False) U1))

type Quantity = Decimal #

The basic numeric type used in amounts.

data Price #

An amount's price (none, per unit, or total) in another commodity. Note the price should be a positive number, although this is not enforced.

Constructors

NoPrice |
UnitPrice Amount |
TotalPrice Amount |

Instances

Eq Price # |
Methods (==) :: Price -> Price -> Bool # (/=) :: Price -> Price -> Bool #
Data Price # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Price -> c Price # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Price # toConstr :: Price -> Constr # dataTypeOf :: Price -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Price) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Price) # gmapT :: (forall b. Data b => b -> b) -> Price -> Price # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Price -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Price -> r # gmapQ :: (forall d. Data d => d -> u) -> Price -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Price -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Price -> m Price # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Price -> m Price # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Price -> m Price #
Ord Price # |
Methods compare :: Price -> Price -> Ordering # (<) :: Price -> Price -> Bool # (<=) :: Price -> Price -> Bool # (>) :: Price -> Price -> Bool # (>=) :: Price -> Price -> Bool # max :: Price -> Price -> Price # min :: Price -> Price -> Price #
Generic Price # |
Associated Types type Rep Price :: * -> * # Methods from :: Price -> Rep Price x # to :: Rep Price x -> Price #
NFData Price # |
Methods rnf :: Price -> () #
type Rep Price # |
type Rep Price = D1 (MetaData "Price" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) (C1 (MetaCons "NoPrice" PrefixI False) U1) ((:+:) (C1 (MetaCons "UnitPrice" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Amount))) (C1 (MetaCons "TotalPrice" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Amount)))))

data AmountStyle #

Display style for an amount.

Constructors

AmountStyle |
Fields ascommodityside :: Side does the symbol appear on the left or the right ? ascommodityspaced :: Bool space between symbol and quantity ? asprecision :: !Int number of digits displayed after the decimal point asdecimalpoint :: Maybe Char character used as decimal point: period or comma. Nothing means "unspecified, use default" asdigitgroups :: Maybe DigitGroupStyle style for displaying digit groups, if any

Instances

Eq AmountStyle # |
Methods (==) :: AmountStyle -> AmountStyle -> Bool # (/=) :: AmountStyle -> AmountStyle -> Bool #
Data AmountStyle # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AmountStyle -> c AmountStyle # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AmountStyle # toConstr :: AmountStyle -> Constr # dataTypeOf :: AmountStyle -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AmountStyle) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AmountStyle) # gmapT :: (forall b. Data b => b -> b) -> AmountStyle -> AmountStyle # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AmountStyle -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AmountStyle -> r # gmapQ :: (forall d. Data d => d -> u) -> AmountStyle -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AmountStyle -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AmountStyle -> m AmountStyle # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AmountStyle -> m AmountStyle # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AmountStyle -> m AmountStyle #
Ord AmountStyle # |
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 #
Read AmountStyle # |
Methods readsPrec :: Int -> ReadS AmountStyle # readList :: ReadS [AmountStyle] # readPrec :: ReadPrec AmountStyle # readListPrec :: ReadPrec [AmountStyle] #
Show AmountStyle # |
Methods showsPrec :: Int -> AmountStyle -> ShowS # show :: AmountStyle -> String # showList :: [AmountStyle] -> ShowS #
Generic AmountStyle # |
Associated Types type Rep AmountStyle :: * -> * # Methods from :: AmountStyle -> Rep AmountStyle x # to :: Rep AmountStyle x -> AmountStyle #
NFData AmountStyle # |
Methods rnf :: AmountStyle -> () #
type Rep AmountStyle # |
type Rep AmountStyle = D1 (MetaData "AmountStyle" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "AmountStyle" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "ascommodityside") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Side)) (S1 (MetaSel (Just Symbol "ascommodityspaced") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) ((:*:) (S1 (MetaSel (Just Symbol "asprecision") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)) ((:*:) (S1 (MetaSel (Just Symbol "asdecimalpoint") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Char))) (S1 (MetaSel (Just Symbol "asdigitgroups") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe DigitGroupStyle)))))))

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 [Int] |

Instances

Eq DigitGroupStyle # |
Methods (==) :: DigitGroupStyle -> DigitGroupStyle -> Bool # (/=) :: DigitGroupStyle -> DigitGroupStyle -> Bool #
Data DigitGroupStyle # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DigitGroupStyle -> c DigitGroupStyle # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DigitGroupStyle # toConstr :: DigitGroupStyle -> Constr # dataTypeOf :: DigitGroupStyle -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DigitGroupStyle) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DigitGroupStyle) # gmapT :: (forall b. Data b => b -> b) -> DigitGroupStyle -> DigitGroupStyle # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DigitGroupStyle -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DigitGroupStyle -> r # gmapQ :: (forall d. Data d => d -> u) -> DigitGroupStyle -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DigitGroupStyle -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DigitGroupStyle -> m DigitGroupStyle # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DigitGroupStyle -> m DigitGroupStyle # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DigitGroupStyle -> m DigitGroupStyle #
Ord DigitGroupStyle # |
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 #
Read DigitGroupStyle # |
Methods readsPrec :: Int -> ReadS DigitGroupStyle # readList :: ReadS [DigitGroupStyle] # readPrec :: ReadPrec DigitGroupStyle # readListPrec :: ReadPrec [DigitGroupStyle] #
Show DigitGroupStyle # |
Methods showsPrec :: Int -> DigitGroupStyle -> ShowS # show :: DigitGroupStyle -> String # showList :: [DigitGroupStyle] -> ShowS #
Generic DigitGroupStyle # |
Associated Types type Rep DigitGroupStyle :: * -> * # Methods from :: DigitGroupStyle -> Rep DigitGroupStyle x # to :: Rep DigitGroupStyle x -> DigitGroupStyle #
NFData DigitGroupStyle # |
Methods rnf :: DigitGroupStyle -> () #
type Rep DigitGroupStyle # |
type Rep DigitGroupStyle = D1 (MetaData "DigitGroupStyle" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "DigitGroups" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Char)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Int]))))

type CommoditySymbol = Text #

data Commodity #

Constructors

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

Instances

Eq Commodity # |
Methods (==) :: Commodity -> Commodity -> Bool # (/=) :: Commodity -> Commodity -> Bool #
Data Commodity # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Commodity -> c Commodity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Commodity # toConstr :: Commodity -> Constr # dataTypeOf :: Commodity -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Commodity) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Commodity) # gmapT :: (forall b. Data b => b -> b) -> Commodity -> Commodity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Commodity -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Commodity -> r # gmapQ :: (forall d. Data d => d -> u) -> Commodity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Commodity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Commodity -> m Commodity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Commodity -> m Commodity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Commodity -> m Commodity #
Show Commodity # |
Methods showsPrec :: Int -> Commodity -> ShowS # show :: Commodity -> String # showList :: [Commodity] -> ShowS #
Generic Commodity # |
Associated Types type Rep Commodity :: * -> * # Methods from :: Commodity -> Rep Commodity x # to :: Rep Commodity x -> Commodity #
NFData Commodity # |
Methods rnf :: Commodity -> () #
type Rep Commodity # |
type Rep Commodity = D1 (MetaData "Commodity" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "Commodity" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "csymbol") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CommoditySymbol)) (S1 (MetaSel (Just Symbol "cformat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe AmountStyle)))))

data Amount #

Constructors

Amount |
Fields acommodity :: CommoditySymbol aquantity :: Quantity aprice :: Price the (fixed) price for this amount, if any astyle :: AmountStyle amultiplier :: Bool amount is a multipier for AutoTransactions

Instances

Eq Amount # |
Methods (==) :: Amount -> Amount -> Bool # (/=) :: Amount -> Amount -> Bool #
Data Amount # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Amount -> c Amount # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Amount # toConstr :: Amount -> Constr # dataTypeOf :: Amount -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Amount) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Amount) # gmapT :: (forall b. Data b => b -> b) -> Amount -> Amount # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Amount -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Amount -> r # gmapQ :: (forall d. Data d => d -> u) -> Amount -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Amount -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Amount -> m Amount # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Amount -> m Amount # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Amount -> m Amount #
Ord Amount # |
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 #
Generic Amount # |
Associated Types type Rep Amount :: * -> * # Methods from :: Amount -> Rep Amount x # to :: Rep Amount x -> Amount #
NFData Amount # |
Methods rnf :: Amount -> () #
type Rep Amount # |
type Rep Amount = D1 (MetaData "Amount" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "Amount" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "acommodity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CommoditySymbol)) (S1 (MetaSel (Just Symbol "aquantity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Quantity))) ((:*:) (S1 (MetaSel (Just Symbol "aprice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Price)) ((:*:) (S1 (MetaSel (Just Symbol "astyle") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AmountStyle)) (S1 (MetaSel (Just Symbol "amultiplier") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))))

newtype MixedAmount #

Constructors

Mixed [Amount] |

Instances

Eq MixedAmount # |
Methods (==) :: MixedAmount -> MixedAmount -> Bool # (/=) :: MixedAmount -> MixedAmount -> Bool #
Data MixedAmount # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MixedAmount -> c MixedAmount # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MixedAmount # toConstr :: MixedAmount -> Constr # dataTypeOf :: MixedAmount -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c MixedAmount) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MixedAmount) # gmapT :: (forall b. Data b => b -> b) -> MixedAmount -> MixedAmount # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MixedAmount -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MixedAmount -> r # gmapQ :: (forall d. Data d => d -> u) -> MixedAmount -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MixedAmount -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MixedAmount -> m MixedAmount # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MixedAmount -> m MixedAmount # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MixedAmount -> m MixedAmount #
Ord MixedAmount # |
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 #
Generic MixedAmount # |
Associated Types type Rep MixedAmount :: * -> * # Methods from :: MixedAmount -> Rep MixedAmount x # to :: Rep MixedAmount x -> MixedAmount #
NFData MixedAmount # |
Methods rnf :: MixedAmount -> () #
type Rep MixedAmount # |
type Rep MixedAmount = D1 (MetaData "MixedAmount" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" True) (C1 (MetaCons "Mixed" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Amount])))

data PostingType #

Constructors

RegularPosting |
VirtualPosting |
BalancedVirtualPosting |

Instances

Eq PostingType # |
Methods (==) :: PostingType -> PostingType -> Bool # (/=) :: PostingType -> PostingType -> Bool #
Data PostingType # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PostingType -> c PostingType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PostingType # toConstr :: PostingType -> Constr # dataTypeOf :: PostingType -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PostingType) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PostingType) # gmapT :: (forall b. Data b => b -> b) -> PostingType -> PostingType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PostingType -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PostingType -> r # gmapQ :: (forall d. Data d => d -> u) -> PostingType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PostingType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PostingType -> m PostingType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PostingType -> m PostingType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PostingType -> m PostingType #
Show PostingType # |
Methods showsPrec :: Int -> PostingType -> ShowS # show :: PostingType -> String # showList :: [PostingType] -> ShowS #
Generic PostingType # |
Associated Types type Rep PostingType :: * -> * # Methods from :: PostingType -> Rep PostingType x # to :: Rep PostingType x -> PostingType #
NFData PostingType # |
Methods rnf :: PostingType -> () #
type Rep PostingType # |
type Rep PostingType = D1 (MetaData "PostingType" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) (C1 (MetaCons "RegularPosting" PrefixI False) U1) ((:+:) (C1 (MetaCons "VirtualPosting" PrefixI False) U1) (C1 (MetaCons "BalancedVirtualPosting" PrefixI False) U1)))

type TagName = Text #

type TagValue = Text #

type Tag #

Arguments

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

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

Bounded Status # |
Methods minBound :: Status # maxBound :: Status #
Enum Status # |
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] #
Eq Status # |
Methods (==) :: Status -> Status -> Bool # (/=) :: Status -> Status -> Bool #
Data Status # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Status -> c Status # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Status # toConstr :: Status -> Constr # dataTypeOf :: Status -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Status) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status) # gmapT :: (forall b. Data b => b -> b) -> Status -> Status # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r # gmapQ :: (forall d. Data d => d -> u) -> Status -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Status -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Status -> m Status # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Status -> m Status # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Status -> m Status #
Ord Status # |
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 #
Show Status # |
Methods showsPrec :: Int -> Status -> ShowS # show :: Status -> String # showList :: [Status] -> ShowS #
Generic Status # |
Associated Types type Rep Status :: * -> * # Methods from :: Status -> Rep Status x # to :: Rep Status x -> Status #
NFData Status # |
Methods rnf :: Status -> () #
type Rep Status # |
type Rep Status = D1 (MetaData "Status" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) (C1 (MetaCons "Unmarked" PrefixI False) U1) ((:+:) (C1 (MetaCons "Pending" PrefixI False) U1) (C1 (MetaCons "Cleared" PrefixI False) U1)))

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 comment pbalanceassertion :: Maybe Amount optional: the expected balance in this commodity in the account after this posting ptransaction :: Maybe Transaction this posting's parent transaction (co-recursive types). Tying this knot gets tedious, Maybe makes it easier/optional. porigin :: Maybe Posting original posting if this one is result of any transformations (one level only)

Instances

Eq Posting # |
Methods (==) :: Posting -> Posting -> Bool # (/=) :: Posting -> Posting -> Bool #
Data Posting # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Posting -> c Posting # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Posting # toConstr :: Posting -> Constr # dataTypeOf :: Posting -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Posting) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Posting) # gmapT :: (forall b. Data b => b -> b) -> Posting -> Posting # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Posting -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Posting -> r # gmapQ :: (forall d. Data d => d -> u) -> Posting -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Posting -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Posting -> m Posting # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Posting -> m Posting # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Posting -> m Posting #
Generic Posting # |
Associated Types type Rep Posting :: * -> * # Methods from :: Posting -> Rep Posting x # to :: Rep Posting x -> Posting #
NFData Posting # |
Methods rnf :: Posting -> () #
type Rep Posting # |
type Rep Posting = D1 (MetaData "Posting" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "Posting" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "pdate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Day))) (S1 (MetaSel (Just Symbol "pdate2") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Day)))) ((:*:) (S1 (MetaSel (Just Symbol "pstatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Status)) ((:*:) (S1 (MetaSel (Just Symbol "paccount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AccountName)) (S1 (MetaSel (Just Symbol "pamount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MixedAmount))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "pcomment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "ptype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PostingType)) (S1 (MetaSel (Just Symbol "ptags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Tag])))) ((:*:) (S1 (MetaSel (Just Symbol "pbalanceassertion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Amount))) ((:*:) (S1 (MetaSel (Just Symbol "ptransaction") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Transaction))) (S1 (MetaSel (Just Symbol "porigin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Posting))))))))

data GenericSourcePos #

The position of parse errors (eg), like parsec's SourcePos but generic.

Constructors

GenericSourcePos FilePath Int Int | name, 1-based line number and 1-based column number.
JournalSourcePos FilePath (Int, Int) | file name, inclusive range of 1-based line numbers (first, last).

Instances

Eq GenericSourcePos # |
Methods (==) :: GenericSourcePos -> GenericSourcePos -> Bool # (/=) :: GenericSourcePos -> GenericSourcePos -> Bool #
Data GenericSourcePos # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenericSourcePos -> c GenericSourcePos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GenericSourcePos # toConstr :: GenericSourcePos -> Constr # dataTypeOf :: GenericSourcePos -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GenericSourcePos) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenericSourcePos) # gmapT :: (forall b. Data b => b -> b) -> GenericSourcePos -> GenericSourcePos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenericSourcePos -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenericSourcePos -> r # gmapQ :: (forall d. Data d => d -> u) -> GenericSourcePos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenericSourcePos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenericSourcePos -> m GenericSourcePos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenericSourcePos -> m GenericSourcePos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenericSourcePos -> m GenericSourcePos #
Ord GenericSourcePos # |
Methods compare :: GenericSourcePos -> GenericSourcePos -> Ordering # (<) :: GenericSourcePos -> GenericSourcePos -> Bool # (<=) :: GenericSourcePos -> GenericSourcePos -> Bool # (>) :: GenericSourcePos -> GenericSourcePos -> Bool # (>=) :: GenericSourcePos -> GenericSourcePos -> Bool # max :: GenericSourcePos -> GenericSourcePos -> GenericSourcePos # min :: GenericSourcePos -> GenericSourcePos -> GenericSourcePos #
Read GenericSourcePos # |
Methods readsPrec :: Int -> ReadS GenericSourcePos # readList :: ReadS [GenericSourcePos] # readPrec :: ReadPrec GenericSourcePos # readListPrec :: ReadPrec [GenericSourcePos] #
Show GenericSourcePos # |
Methods showsPrec :: Int -> GenericSourcePos -> ShowS # show :: GenericSourcePos -> String # showList :: [GenericSourcePos] -> ShowS #
Generic GenericSourcePos # |
Associated Types type Rep GenericSourcePos :: * -> * # Methods from :: GenericSourcePos -> Rep GenericSourcePos x # to :: Rep GenericSourcePos x -> GenericSourcePos #
NFData GenericSourcePos # |
Methods rnf :: GenericSourcePos -> () #
type Rep GenericSourcePos # |
type Rep GenericSourcePos = D1 (MetaData "GenericSourcePos" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) (C1 (MetaCons "GenericSourcePos" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))) (C1 (MetaCons "JournalSourcePos" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Int, Int))))))

data Transaction #

Constructors

Transaction |
Fields tindex :: Integer this transaction's 1-based position in the input stream, or 0 when not available tsourcepos :: GenericSourcePos 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 tpreceding_comment_lines :: Text any comment lines immediately preceding this transaction

Instances

Eq Transaction # |
Methods (==) :: Transaction -> Transaction -> Bool # (/=) :: Transaction -> Transaction -> Bool #
Data Transaction # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Transaction -> c Transaction # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Transaction # toConstr :: Transaction -> Constr # dataTypeOf :: Transaction -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Transaction) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Transaction) # gmapT :: (forall b. Data b => b -> b) -> Transaction -> Transaction # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Transaction -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Transaction -> r # gmapQ :: (forall d. Data d => d -> u) -> Transaction -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Transaction -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Transaction -> m Transaction # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Transaction -> m Transaction # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Transaction -> m Transaction #
Generic Transaction # |
Associated Types type Rep Transaction :: * -> * # Methods from :: Transaction -> Rep Transaction x # to :: Rep Transaction x -> Transaction #
NFData Transaction # |
Methods rnf :: Transaction -> () #
type Rep Transaction # |
type Rep Transaction = D1 (MetaData "Transaction" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "Transaction" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "tindex") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)) (S1 (MetaSel (Just Symbol "tsourcepos") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GenericSourcePos))) ((:*:) (S1 (MetaSel (Just Symbol "tdate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day)) ((:*:) (S1 (MetaSel (Just Symbol "tdate2") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Day))) (S1 (MetaSel (Just Symbol "tstatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Status))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "tcode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "tdescription") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "tcomment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))) ((:*:) (S1 (MetaSel (Just Symbol "ttags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Tag])) ((:*:) (S1 (MetaSel (Just Symbol "tpostings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Posting])) (S1 (MetaSel (Just Symbol "tpreceding_comment_lines") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))))))

data ModifierTransaction #

Constructors

ModifierTransaction |
Fields mtvalueexpr :: Text mtpostings :: [Posting]

Instances

Eq ModifierTransaction # |
Methods (==) :: ModifierTransaction -> ModifierTransaction -> Bool # (/=) :: ModifierTransaction -> ModifierTransaction -> Bool #
Data ModifierTransaction # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModifierTransaction -> c ModifierTransaction # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModifierTransaction # toConstr :: ModifierTransaction -> Constr # dataTypeOf :: ModifierTransaction -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ModifierTransaction) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModifierTransaction) # gmapT :: (forall b. Data b => b -> b) -> ModifierTransaction -> ModifierTransaction # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModifierTransaction -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModifierTransaction -> r # gmapQ :: (forall d. Data d => d -> u) -> ModifierTransaction -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ModifierTransaction -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModifierTransaction -> m ModifierTransaction # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModifierTransaction -> m ModifierTransaction # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModifierTransaction -> m ModifierTransaction #
Generic ModifierTransaction # |
Associated Types type Rep ModifierTransaction :: * -> * # Methods from :: ModifierTransaction -> Rep ModifierTransaction x # to :: Rep ModifierTransaction x -> ModifierTransaction #
NFData ModifierTransaction # |
Methods rnf :: ModifierTransaction -> () #
type Rep ModifierTransaction # |
type Rep ModifierTransaction = D1 (MetaData "ModifierTransaction" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "ModifierTransaction" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "mtvalueexpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "mtpostings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Posting]))))

data PeriodicTransaction #

Constructors

PeriodicTransaction |
Fields ptperiodicexpr :: Text ptpostings :: [Posting]

Instances

Eq PeriodicTransaction # |
Methods (==) :: PeriodicTransaction -> PeriodicTransaction -> Bool # (/=) :: PeriodicTransaction -> PeriodicTransaction -> Bool #
Data PeriodicTransaction # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PeriodicTransaction -> c PeriodicTransaction # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PeriodicTransaction # toConstr :: PeriodicTransaction -> Constr # dataTypeOf :: PeriodicTransaction -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PeriodicTransaction) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PeriodicTransaction) # gmapT :: (forall b. Data b => b -> b) -> PeriodicTransaction -> PeriodicTransaction # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PeriodicTransaction -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PeriodicTransaction -> r # gmapQ :: (forall d. Data d => d -> u) -> PeriodicTransaction -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PeriodicTransaction -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PeriodicTransaction -> m PeriodicTransaction # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PeriodicTransaction -> m PeriodicTransaction # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PeriodicTransaction -> m PeriodicTransaction #
Generic PeriodicTransaction # |
Associated Types type Rep PeriodicTransaction :: * -> * # Methods from :: PeriodicTransaction -> Rep PeriodicTransaction x # to :: Rep PeriodicTransaction x -> PeriodicTransaction #
NFData PeriodicTransaction # |
Methods rnf :: PeriodicTransaction -> () #
type Rep PeriodicTransaction # |
type Rep PeriodicTransaction = D1 (MetaData "PeriodicTransaction" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "PeriodicTransaction" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "ptperiodicexpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "ptpostings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Posting]))))

data TimeclockCode #

Constructors

SetBalance |
SetRequiredHours |
In |
Out |
FinalOut |

Instances

Eq TimeclockCode # |
Methods (==) :: TimeclockCode -> TimeclockCode -> Bool # (/=) :: TimeclockCode -> TimeclockCode -> Bool #
Data TimeclockCode # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeclockCode -> c TimeclockCode # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeclockCode # toConstr :: TimeclockCode -> Constr # dataTypeOf :: TimeclockCode -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TimeclockCode) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeclockCode) # gmapT :: (forall b. Data b => b -> b) -> TimeclockCode -> TimeclockCode # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeclockCode -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeclockCode -> r # gmapQ :: (forall d. Data d => d -> u) -> TimeclockCode -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeclockCode -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeclockCode -> m TimeclockCode # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeclockCode -> m TimeclockCode # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeclockCode -> m TimeclockCode #
Ord TimeclockCode # |
Methods compare :: TimeclockCode -> TimeclockCode -> Ordering # (<) :: TimeclockCode -> TimeclockCode -> Bool # (<=) :: TimeclockCode -> TimeclockCode -> Bool # (>) :: TimeclockCode -> TimeclockCode -> Bool # (>=) :: TimeclockCode -> TimeclockCode -> Bool # max :: TimeclockCode -> TimeclockCode -> TimeclockCode # min :: TimeclockCode -> TimeclockCode -> TimeclockCode #
Generic TimeclockCode # |
Associated Types type Rep TimeclockCode :: * -> * # Methods from :: TimeclockCode -> Rep TimeclockCode x # to :: Rep TimeclockCode x -> TimeclockCode #
NFData TimeclockCode # |
Methods rnf :: TimeclockCode -> () #
type Rep TimeclockCode # |
type Rep TimeclockCode = D1 (MetaData "TimeclockCode" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) ((:+:) ((:+:) (C1 (MetaCons "SetBalance" PrefixI False) U1) (C1 (MetaCons "SetRequiredHours" PrefixI False) U1)) ((:+:) (C1 (MetaCons "In" PrefixI False) U1) ((:+:) (C1 (MetaCons "Out" PrefixI False) U1) (C1 (MetaCons "FinalOut" PrefixI False) U1))))

data TimeclockEntry #

Constructors

TimeclockEntry |
Fields tlsourcepos :: GenericSourcePos tlcode :: TimeclockCode tldatetime :: LocalTime tlaccount :: AccountName tldescription :: Text

Instances

Eq TimeclockEntry # |
Methods (==) :: TimeclockEntry -> TimeclockEntry -> Bool # (/=) :: TimeclockEntry -> TimeclockEntry -> Bool #
Data TimeclockEntry # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeclockEntry -> c TimeclockEntry # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeclockEntry # toConstr :: TimeclockEntry -> Constr # dataTypeOf :: TimeclockEntry -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c TimeclockEntry) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeclockEntry) # gmapT :: (forall b. Data b => b -> b) -> TimeclockEntry -> TimeclockEntry # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeclockEntry -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeclockEntry -> r # gmapQ :: (forall d. Data d => d -> u) -> TimeclockEntry -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeclockEntry -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeclockEntry -> m TimeclockEntry # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeclockEntry -> m TimeclockEntry # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeclockEntry -> m TimeclockEntry #
Ord TimeclockEntry # |
Methods compare :: TimeclockEntry -> TimeclockEntry -> Ordering # (<) :: TimeclockEntry -> TimeclockEntry -> Bool # (<=) :: TimeclockEntry -> TimeclockEntry -> Bool # (>) :: TimeclockEntry -> TimeclockEntry -> Bool # (>=) :: TimeclockEntry -> TimeclockEntry -> Bool # max :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry # min :: TimeclockEntry -> TimeclockEntry -> TimeclockEntry #
Generic TimeclockEntry # |
Associated Types type Rep TimeclockEntry :: * -> * # Methods from :: TimeclockEntry -> Rep TimeclockEntry x # to :: Rep TimeclockEntry x -> TimeclockEntry #
NFData TimeclockEntry # |
Methods rnf :: TimeclockEntry -> () #
type Rep TimeclockEntry # |
type Rep TimeclockEntry = D1 (MetaData "TimeclockEntry" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "TimeclockEntry" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "tlsourcepos") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GenericSourcePos)) (S1 (MetaSel (Just Symbol "tlcode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TimeclockCode))) ((:*:) (S1 (MetaSel (Just Symbol "tldatetime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LocalTime)) ((:*:) (S1 (MetaSel (Just Symbol "tlaccount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AccountName)) (S1 (MetaSel (Just Symbol "tldescription") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))))

data MarketPrice #

Constructors

MarketPrice |
Fields mpdate :: Day mpcommodity :: CommoditySymbol mpamount :: Amount

Instances

Eq MarketPrice # |
Methods (==) :: MarketPrice -> MarketPrice -> Bool # (/=) :: MarketPrice -> MarketPrice -> Bool #
Data MarketPrice # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MarketPrice -> c MarketPrice # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MarketPrice # toConstr :: MarketPrice -> Constr # dataTypeOf :: MarketPrice -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c MarketPrice) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MarketPrice) # gmapT :: (forall b. Data b => b -> b) -> MarketPrice -> MarketPrice # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MarketPrice -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MarketPrice -> r # gmapQ :: (forall d. Data d => d -> u) -> MarketPrice -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MarketPrice -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MarketPrice -> m MarketPrice # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MarketPrice -> m MarketPrice # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MarketPrice -> m MarketPrice #
Ord MarketPrice # |
Methods compare :: MarketPrice -> MarketPrice -> Ordering # (<) :: MarketPrice -> MarketPrice -> Bool # (<=) :: MarketPrice -> MarketPrice -> Bool # (>) :: MarketPrice -> MarketPrice -> Bool # (>=) :: MarketPrice -> MarketPrice -> Bool # max :: MarketPrice -> MarketPrice -> MarketPrice # min :: MarketPrice -> MarketPrice -> MarketPrice #
Generic MarketPrice # |
Associated Types type Rep MarketPrice :: * -> * # Methods from :: MarketPrice -> Rep MarketPrice x # to :: Rep MarketPrice x -> MarketPrice #
NFData MarketPrice # |
Methods rnf :: MarketPrice -> () #
type Rep MarketPrice # |
type Rep MarketPrice = D1 (MetaData "MarketPrice" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "MarketPrice" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "mpdate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Day)) ((:*:) (S1 (MetaSel (Just Symbol "mpcommodity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CommoditySymbol)) (S1 (MetaSel (Just Symbol "mpamount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Amount)))))

data Journal #

A Journal, containing transactions and various other things. The basic data model for hledger.

This is used during parsing (as the type alias ParsedJournal), and then finalised/validated for use as a Journal. Some extra parsing-related fields are included for convenience, at least for now. In a ParsedJournal these are updated as parsing proceeds, in a Journal they represent the final state at end of parsing (used eg by the add command).

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 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 principal data jaccounts :: [AccountName] accounts that have been declared by account directives jcommodities :: Map CommoditySymbol Commodity commodities and formats declared by commodity directives jinferredcommodities :: Map CommoditySymbol AmountStyle commodities and formats inferred from journal amounts jmarketprices :: [MarketPrice] jmodifiertxns :: [ModifierTransaction] jperiodictxns :: [PeriodicTransaction] jtxns :: [Transaction] 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. jlastreadtime :: ClockTime when this journal was last read from its file(s)

Instances

Eq Journal # |
Methods (==) :: Journal -> Journal -> Bool # (/=) :: Journal -> Journal -> Bool #
Data Journal # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Journal -> c Journal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Journal # toConstr :: Journal -> Constr # dataTypeOf :: Journal -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Journal) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Journal) # gmapT :: (forall b. Data b => b -> b) -> Journal -> Journal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Journal -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Journal -> r # gmapQ :: (forall d. Data d => d -> u) -> Journal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Journal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Journal -> m Journal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Journal -> m Journal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Journal -> m Journal #
Generic Journal # |
Associated Types type Rep Journal :: * -> * # Methods from :: Journal -> Rep Journal x # to :: Rep Journal x -> Journal #
NFData Journal # |
Methods rnf :: Journal -> () #
type Rep Journal # |
type Rep Journal = D1 (MetaData "Journal" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "Journal" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "jparsedefaultyear") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Year))) ((:*:) (S1 (MetaSel (Just Symbol "jparsedefaultcommodity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (CommoditySymbol, AmountStyle)))) (S1 (MetaSel (Just Symbol "jparseparentaccounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [AccountName])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "jparsealiases") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [AccountAlias])) (S1 (MetaSel (Just Symbol "jparsetimeclockentries") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TimeclockEntry]))) ((:*:) (S1 (MetaSel (Just Symbol "jaccounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [AccountName])) (S1 (MetaSel (Just Symbol "jcommodities") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map CommoditySymbol Commodity)))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "jinferredcommodities") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map CommoditySymbol AmountStyle))) (S1 (MetaSel (Just Symbol "jmarketprices") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [MarketPrice]))) ((:*:) (S1 (MetaSel (Just Symbol "jmodifiertxns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ModifierTransaction])) (S1 (MetaSel (Just Symbol "jperiodictxns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [PeriodicTransaction])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "jtxns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Transaction])) (S1 (MetaSel (Just Symbol "jfinalcommentlines") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "jfiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(FilePath, Text)])) (S1 (MetaSel (Just Symbol "jlastreadtime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ClockTime)))))))

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.

type StorageFormat = String #

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

data Reader #

A hledger journal reader is a triple of storage format name, a detector of that format, and a parser from that format to Journal.

Constructors

Reader |
Fields rFormat :: StorageFormat rExtensions :: [String] rParser :: Maybe FilePath -> Bool -> FilePath -> Text -> ExceptT String IO Journal rExperimental :: Bool

Instances

Show Reader # |
Methods showsPrec :: Int -> Reader -> ShowS # show :: Reader -> String # showList :: [Reader] -> ShowS #

data Account #

An account, with name, balances and links to parent/subaccounts which let you walk up or down the account tree.

Constructors

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

Instances

Data Account # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Account -> c Account # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Account # toConstr :: Account -> Constr # dataTypeOf :: Account -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Account) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Account) # gmapT :: (forall b. Data b => b -> b) -> Account -> Account # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Account -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Account -> r # gmapQ :: (forall d. Data d => d -> u) -> Account -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Account -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Account -> m Account # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Account -> m Account # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Account -> m Account #
Generic Account # |
Associated Types type Rep Account :: * -> * # Methods from :: Account -> Rep Account x # to :: Rep Account x -> Account #
type Rep Account # |
type Rep Account = D1 (MetaData "Account" "Hledger.Data.Types" "hledger-lib-1.3-92jrkUykEU38AWlukeydoO" False) (C1 (MetaCons "Account" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "aname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AccountName)) ((:*:) (S1 (MetaSel (Just Symbol "aebalance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MixedAmount)) (S1 (MetaSel (Just Symbol "asubs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Account])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "anumpostings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "aibalance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MixedAmount))) ((:*:) (S1 (MetaSel (Just Symbol "aparent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Account))) (S1 (MetaSel (Just Symbol "aboring") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))))

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]

# Orphan instances

Data ClockTime # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ClockTime -> c ClockTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ClockTime # toConstr :: ClockTime -> Constr # dataTypeOf :: ClockTime -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ClockTime) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClockTime) # gmapT :: (forall b. Data b => b -> b) -> ClockTime -> ClockTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ClockTime -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ClockTime -> r # gmapQ :: (forall d. Data d => d -> u) -> ClockTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ClockTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ClockTime -> m ClockTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ClockTime -> m ClockTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ClockTime -> m ClockTime #
Generic ClockTime # |
Associated Types type Rep ClockTime :: * -> * # Methods from :: ClockTime -> Rep ClockTime x # to :: Rep ClockTime x -> ClockTime #
ToMarkup Quantity # |
Methods toMarkup :: Quantity -> Markup # preEscapedToMarkup :: Quantity -> Markup #
NFData ClockTime # |
Methods rnf :: ClockTime -> () #
Data (DecimalRaw Integer) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DecimalRaw Integer -> c (DecimalRaw Integer) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DecimalRaw Integer) # toConstr :: DecimalRaw Integer -> Constr # dataTypeOf :: DecimalRaw Integer -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (DecimalRaw Integer)) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DecimalRaw Integer)) # gmapT :: (forall b. Data b => b -> b) -> DecimalRaw Integer -> DecimalRaw Integer # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DecimalRaw Integer -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DecimalRaw Integer -> r # gmapQ :: (forall d. Data d => d -> u) -> DecimalRaw Integer -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DecimalRaw Integer -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DecimalRaw Integer -> m (DecimalRaw Integer) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DecimalRaw Integer -> m (DecimalRaw Integer) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DecimalRaw Integer -> m (DecimalRaw Integer) #