HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehledger-lib-1.52.4GHC2021

Hledger.Read.InputOptions

Various options to use when reading journal files. Similar to CliOptions.inputflags, simplifies the journal-reading functions.

  • 1 type
  • 1 class
  • 2 values
  • Packagehledger-lib-1.52.4
  • Exports4
  • LanguageGHC2021
  • LicenceGPL-3.0-or-later
  • SourceInputOptions.hs

Types and helpers for input options

4 declarations
datadata InputOpts
#

Constructors

  • InputOpts
    • mformat_ :: Maybe StorageFormat

      a file/storage format to try, unless overridden by a filename prefix. Nothing means try all.

    • mrules_file_ :: Maybe FilePath

      a conversion rules file to use (when reading CSV)

    • aliases_ :: [String]

      account name aliases to apply

    • anon_ :: Bool

      do light obfuscation of the data ? Now corresponds to --obfuscate, not the old --anon flag.

    • new_ :: Bool

      read only new transactions since this file was last read ?

    • new_save_ :: Bool

      save latest new transactions state for next time ?

    • pivot_ :: String

      use the given field's value as the account name

    • forecast_ :: Maybe DateSpan

      span in which to generate forecast transactions

    • auto_posting_tags_ :: Bool

      propagate commodity and account tags to postings ? Can be disabled (for beancount export).

    • verbose_tags_ :: Bool

      add user-visible tags when generating/modifying transactions & postings ?

    • reportspan_ :: DateSpan

      a dirty hack keeping the query dates in InputOpts. This rightfully lives in ReportSpec, but is duplicated here.

    • auto_ :: Bool

      generate extra postings according to auto posting rules ?

    • infer_equity_ :: Bool

      infer equity conversion postings from costs ?

    • infer_costs_ :: Bool

      infer costs from equity conversion postings ? distinct from BalancingOpts{infer_balancing_costs_}

    • balancingopts_ :: BalancingOpts

      options for transaction balancing

    • strict_ :: Bool

      do extra correctness checks ?

    • _defer :: Bool

      internal flag: postpone checks, because we are processing multiple files ?

    • _ioDay :: Day

      today's date, for use with forecast transactions XXX this duplicates _rsDay, and should eventually be removed when it's not needed anymore.

    • _oldtimeclock :: Bool

      parse with the old timeclock pairing rules?

Instances5Eq, Ord, Show, HasBalancingOpts, HasInputOpts
classclass HasInputOpts c where
#
Instances1HasInputOpts

Get the Maybe the DateSpan to generate forecast options from. This begins on: - the start date supplied to the `--forecast` argument, if present - otherwise, the later of - the report start date if specified with -b-pdate: - the day after the latest normal (non-periodic) transaction in the journal, if any - otherwise today. It ends on: - the end date supplied to the `--forecast` argument, if present - otherwise the report end date if specified with -e-pdate: - otherwise 180 days (6 months) from today.