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

Safe HaskellNone
LanguageHaskell2010

Hledger.Reports.ReportOptions

Contents

Description

Options common to most hledger reports.

Synopsis

Documentation

data ReportOpts #

Standard options for customising report filtering and output, corresponding to hledger's command-line options and query language arguments. Used in hledger-lib and above.

Instances

Data ReportOpts # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ReportOpts -> c ReportOpts #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ReportOpts #

toConstr :: ReportOpts -> Constr #

dataTypeOf :: ReportOpts -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ReportOpts) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ReportOpts) #

gmapT :: (forall b. Data b => b -> b) -> ReportOpts -> ReportOpts #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ReportOpts -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ReportOpts -> r #

gmapQ :: (forall d. Data d => d -> u) -> ReportOpts -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ReportOpts -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ReportOpts -> m ReportOpts #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ReportOpts -> m ReportOpts #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ReportOpts -> m ReportOpts #

Show ReportOpts # 
Default ReportOpts # 

Methods

def :: ReportOpts #

data BalanceType #

Which "balance" is being shown in a balance report.

Constructors

PeriodChange

The change of balance in each period.

CumulativeChange

The accumulated change across multiple periods.

HistoricalBalance

The historical ending balance, including the effect of all postings before the report period. Unless altered by, a query, this is what you would see on a bank statement.

Instances

Eq BalanceType # 
Data BalanceType # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BalanceType -> c BalanceType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BalanceType #

toConstr :: BalanceType -> Constr #

dataTypeOf :: BalanceType -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c BalanceType) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BalanceType) #

gmapT :: (forall b. Data b => b -> b) -> BalanceType -> BalanceType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BalanceType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BalanceType -> r #

gmapQ :: (forall d. Data d => d -> u) -> BalanceType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BalanceType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BalanceType -> m BalanceType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BalanceType -> m BalanceType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BalanceType -> m BalanceType #

Show BalanceType # 
Default BalanceType # 

Methods

def :: BalanceType #

data AccountListMode #

Should accounts be displayed: in the command's default style, hierarchically, or as a flat list ?

Constructors

ALDefault 
ALTree 
ALFlat 

Instances

Eq AccountListMode # 
Data AccountListMode # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AccountListMode -> c AccountListMode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AccountListMode #

toConstr :: AccountListMode -> Constr #

dataTypeOf :: AccountListMode -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AccountListMode) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AccountListMode) #

gmapT :: (forall b. Data b => b -> b) -> AccountListMode -> AccountListMode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AccountListMode -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AccountListMode -> r #

gmapQ :: (forall d. Data d => d -> u) -> AccountListMode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AccountListMode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AccountListMode -> m AccountListMode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AccountListMode -> m AccountListMode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AccountListMode -> m AccountListMode #

Show AccountListMode # 
Default AccountListMode # 

checkReportOpts :: ReportOpts -> ReportOpts #

Do extra validation of report options, raising an error if there's a problem.

tree_ :: ReportOpts -> Bool #

Legacy-compatible convenience aliases for accountlistmode_.

whichDateFromOpts :: ReportOpts -> WhichDate #

Report which date we will report on based on --date2.

journalSelectingAmountFromOpts :: ReportOpts -> Journal -> Journal #

Convert this journal's postings' amounts to the cost basis amounts if specified by options.

queryFromOpts :: Day -> ReportOpts -> Query #

Convert report options and arguments to a query.

queryFromOptsOnly :: Day -> ReportOpts -> Query #

Convert report options to a query, ignoring any non-flag command line arguments.

queryOptsFromOpts :: Day -> ReportOpts -> [QueryOpt] #

Convert report options and arguments to query options.

transactionDateFn :: ReportOpts -> Transaction -> Day #

Select the Transaction date accessor based on --date2.

postingDateFn :: ReportOpts -> Posting -> Day #

Select the Posting date accessor based on --date2.

reportStartDate :: Journal -> ReportOpts -> IO (Maybe Day) #

The effective report start date is the one specified by options or queries, otherwise the earliest transaction or posting date in the journal, otherwise (for an empty journal) nothing. Needs IO to parse smart dates in options/queries.

reportEndDate :: Journal -> ReportOpts -> IO (Maybe Day) #

The effective report end date is the one specified by options or queries, otherwise the latest transaction or posting date in the journal, otherwise (for an empty journal) nothing. Needs IO to parse smart dates in options/queries.

Orphan instances

Default Bool # 

Methods

def :: Bool #