İyL+      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""""" " # # # #$$$$$$$%%%%%&&&&&& &!&"&#&$&%&&&'&(')(*)+*Safe +,-./01234567,234567 +,-./01234567+NoneC89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz,89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW]XYZ[\^_`aby89:;<=>?@ABCDEFGHIJKLMNOPQRSTUV WXYZ[\]^_`abcdefghijklmnopqrstuvwxyzc4Safe  A string received from or being passed to the operating system, such as a file path, command-line argument, or environment variable name or value. With GHC versions before 7.2 on some platforms (posix) these are typically encoded. When converting, we assume the encoding is UTF-8 (cf  Dhttp://www.dwheeler.com/essays/fixing-unix-linux-filenames.html#UTF8). Convert a system string to an ordinary string, decoding from UTF-8 if it appears to be UTF8-encoded and GHC version is less than 7.2. oConvert a unicode string to a system string, encoding with UTF-8 if we are on a posix platform with GHC < 7.2. &A SystemString-aware version of error.*A SystemString-aware version of userError.    None(Get a Test's label, or the empty string.@Flatten a Test containing TestLists into a list of single tests.BFilter TestLists in a Test, recursively, preserving the structure.ESimple way to assert something is some expected value, with no label.IAssert a parse result is successful, printing the parse error on failure.IAssert a parse result is successful, printing the parse error on failure.RAssert a parse result is some expected value, printing the parse error on failure.NoneT>A replacement pattern. May include numeric backreferences (N).aRegular expression. Extended regular expression-ish syntax ? But does not support eg (?i) syntax.{[Convert our string-based regexps to real ones. Can fail if the string regexp is malformed.WReplace all occurrences of the regexp, transforming each match with the given function.Replace all occurrences of the regexp with the replacement pattern. The replacement pattern supports numeric backreferences (N) but no other RE syntax.zA memoising version of regexReplace. Caches the result for each search pattern, replacement pattern, target string tuple.|aReplace all occurrences of a regexp in a string, transforming each match with the given function.{}~ |   {}~ |None !`An efficient-to-build tree suggested by Cale Gibbard, probably better than accountNameTreeFrom.&"List just the leaf nodes of a tree'eget the sub-tree rooted at the first (left-most, depth-first) occurrence of the specified node value(^get the sub-tree for the specified node value in the first tree in forest in which it occurs.)%remove all nodes past a certain depth*apply f to all tree nodes+8remove all subtrees whose nodes do not fulfill predicate,'is predicate true in any node of tree ?--show a compact ascii representation of a tree./show a compact ascii representation of a forest!"#$%&'()*+,-./012!"#$%&'()*+,-./012#$%&'()*+,-.!"/012!"#$%&'()*+,-./012None/059;.6A 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.:pAn account, with name, balances and links to parent/subaccounts which let you walk up or down the account tree.<this account's full name=-this account's balance, excluding subaccounts> sub-accounts?<number of postings to this account derived from the above :@-this account's balance, including subaccountsAparent accountB5used in the accounts report to label elidable parentsCA hledger journal reader is a triple of storage format name, a detector of that format, and a parser from that format to Journal.I2The id of a data format understood by hledger, eg journal or csv>. The --output-format option selects one of these for output.JxA journal in the process of being parsed, not yet finalised. The data is partial, and list fields are in reverse order.K_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).MTthe current default year, specified by the most recent Y directive (or current date)NVthe current default commodity and its format, specified by the most recent D directiveOPthe current stack of parent account names, specified by apply account directivesPthe 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)QBtimeclock sessions which have not been clocked out principal dataR6accounts that have been declared by account directivesS8commodities and formats declared by commodity directivesT5commodities and formats inferred from journal amountsY6any final trailing comments in the (main) journal fileZthe 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.[0when this journal was last read from its file(s)xPthis transaction's 1-based position in the input stream, or 0 when not availableLthis transaction's comment lines, as a single non-indented multi-line string0tag names and values, extracted from the commentthis transaction's postings8any comment lines immediately preceding this transactionThe position of parse errors (eg), like parsec's SourcePos but generic. File name, 1-based line number and 1-based column number.8this posting's date, if different from the transaction'sBthis posting's secondary date, if different from the transaction'sHthis posting's comment lines, as a single non-indented multi-line string0tag names and values, extracted from the commentRoptional: the expected balance in this commodity in the account after this postingvthis posting's parent transaction (co-recursive types). Tying this knot gets tedious, Maybe makes it easier/optional.)the (fixed) price for this amount, if anysA 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].Display style for an amount.1does the symbol appear on the left or the right ?#space between symbol and quantity ?2number of digits displayed after the decimal pointZcharacter used as decimal point: period or comma. Nothing means "unspecified, use default")style for displaying digit groups, if anyAn amount's price (none, per unit, or total) in another commodity. Note the price should be a positive number, although this is not enforced.'The basic numeric type used in amounts.6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~&A tag name and (possibly empty) value.6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghkijlmnopqrstuvwxyz{|}~vwxyz{|}~rstunopqhijklmabcdefg\]^_`KLMNOPQRSTUVWXYZ[JICDEFGH:;<=>?@AB6789G6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv wxyz{|}~  None:DR`BA journal parser that runs in IO and can throw an error mid-parse.cGA parser of strict text with generic user state, monad and return type.dgBacktracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.egBacktracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail.`abcdefghijklmnopq`abcdefghijklmnopqcba`defghijklmnopq`abcdefghijklmnopqNone:DR sFTrace (print to stderr) a showable value using a custom show function.tiParsec trace - show the current parsec position and next input, and the provided label if it's non-null.uGlobal debug level, which controls the verbosity of debug output on the console. The default is 0 meaning no debug output. The --debug$ command line flag sets it to 1, or  --debug=N' sets it to a higher value (note: not  --debug N, for some reason). This uses unsafePerformIO and can be accessed from anywhere and before normal command-line processing. When running with :main in GHCI, you must touch and reload this module to see the effect of a new --debug option. After command-line processing, it is also available as the debug_ field of ,-. {- OPTIONS_GHC -fno-cse -} {- NOINLINE debugLevel -}v&Convenience aliases for tracePrettyAt.wPretty-print a message and the showable value to the console when the debug level is >= 1, then return it. Uses unsafePerformIO. Convenience aliases for tracePrettyAtIO. Like dbg, but convenient to insert in an IO monad. XXX These have a bug; they should use traceIO, not trace, otherwise GHC can occasionally over-optimise (cf lpaste a few days ago where it killed/blocked a child thread).Pretty-print a message and a showable value to the console if the debug level is at or above the specified level. dbtAt 0 always prints. Otherwise, uses unsafePerformIO.print this string to the console before evaluating the expression, if the global debug level is at or above the specified level. Uses unsafePerformIO. dbgtrace :: Int -> String -> a -> a dbgtrace level | debugLevel >= level = trace | otherwise = flip constXPrint a showable value to the console, with a message, if the debug level is at or above the specified level (uses unsafePerformIO). Values are displayed with show, all on one line, which is hard to read. dbgshow :: Show a => Int -> String -> a -> a dbgshow level | debugLevel >= level = ltrace | otherwise = flip constPrint a showable value to the console, with a message, if the debug level is at or above the specified level (uses unsafePerformIO). Values are displayed with ppShow, each field/constructor on its own line.6Like dbg, then exit the program. Uses unsafePerformIO.Print a message and parsec debug info (parse position and next input) to the console when the debug level is at or above this level. Uses unsafePerformIO. pdbgAt :: GenParser m => Float -> String -> m ()Like dbg, but writes the output to "debug.log" in the current directory. Uses unsafePerformIO. Can fail due to log file contention if called too quickly ("*** Exception: debug.log: openFile: resource busy (file is locked)").rstuvwxyz{|}~, rstuvwxyz{|}~rstuvwxyz{|}~ rstuvwxyz{|}~None'Remove leading and trailing whitespace.Remove leading whitespace.Remove trailing whitespace.*Remove trailing newlines/carriage returns.7Clip and pad a string to a minimum & maximum width, andor left\right justify it. Works on multi-line strings too (but will rewrite non-unix line endings).sDouble-quote this string if it contains whitespace, single quotes or double-quotes, escaping the quotes as needed.sSingle-quote this string if it contains whitespace or double-quotes. No good for strings containing single quotes.tQuote-aware version of words - don't split on spaces which are inside quotes. NB correctly handles "a'b" but not "'a''". Can raise an error if parsing fails.NQuote-aware version of unwords - single-quote strings which contain whitespaceKStrip one matching pair of single or double quotes on the ends of a string.Join several multi-line strings as side-by-side rectangular strings of the same height, top-padded. Treats wide characters as double width.Join several multi-line strings as side-by-side rectangular strings of the same height, bottom-padded. Treats wide characters as double width.Join multi-line strings horizontally, after compressing each of them to a single line with a comma and space between each original line.7Join strings vertically, left-aligned and right-padded.7Join strings vertically, right-aligned and left-padded.WConvert a multi-line string to a rectangular string top-padded to the specified height.ZConvert a multi-line string to a rectangular string bottom-padded to the specified height.Convert a multi-line string to a rectangular string left-padded to the specified width. Treats wide characters as double width.Convert a multi-line string to a rectangular string right-padded to the specified width. Treats wide characters as double width.MClip a multi-line string to the specified width and height from the top left.HClip and pad a multi-line string to fill the specified width and height.{General-purpose wide-char-aware single-line string layout function. It can left- or right-pad a short string to a minimum width. It can left- or right-clip a long string to a maximum width, optionally inserting an ellipsis (the third argument). It clips and pads on the right when the fourth argument is true, otherwise on the left. It treats wide characters as double width.A version of fitString that works on multi-line strings, separate for now to avoid breakage. This will rewrite any line endings to unix newlines.Left-pad a string to the specified width. Treats wide characters as double width. Works on multi-line strings too (but will rewrite non-unix line endings).Right-pad a string to the specified width. Treats wide characters as double width. Works on multi-line strings too (but will rewrite non-unix line endings).Double-width-character-aware string truncation. Take as many characters as possible from a string without exceeding the specified width. Eg takeWidth 3 "000T" = "0".Calculate the designated render width of a string, taking into account wide characters and line breaks (the longest line within a multi-line string determines the width ).Get the designated render width of a character: 0 for a combining character, 1 for a regular character, 2 for a wide character. (Wide characters are rendered as exactly double width in apps and fonts that support it.) (From Pandoc.)*##* None 'Remove leading and trailing whitespace.Remove leading whitespace.Remove trailing whitespace.Wrap a string in double quotes, and -prefix any embedded single quotes, if it contains whitespace and is not already single- or double-quoted.KStrip one matching pair of single or double quotes on the ends of a string.Join several multi-line strings as side-by-side rectangular strings of the same height, top-padded. Treats wide characters as double width.yGeneral-purpose wide-char-aware single-line text layout function. It can left- or right-pad a short string to a minimum width. It can left- or right-clip a long string to a maximum width, optionally inserting an ellipsis (the third argument). It clips and pads on the right when the fourth argument is true, otherwise on the left. It treats wide characters as double width.Left-pad a text to the specified width. Treats wide characters as double width. Works on multi-line texts too (but will rewrite non-unix line endings).Right-pad a string to the specified width. Treats wide characters as double width. Works on multi-line strings too (but will rewrite non-unix line endings).Double-width-character-aware string truncation. Take as many characters as possible from a string without exceeding the specified width. Eg textTakeWidth 3 "000T" = "0".Calculate the designated render width of a string, taking into account wide characters and line breaks (the longest line within a multi-line string determines the width ). NoneJApply a function the specified number of times. Possibly uses O(n) stack ?Convert a possibly relative, possibly tilde-containing file path to an absolute one, given the current directory. ~username is not supported. Leave "-" unchanged. Can raise an error.YRead a file in universal newline mode, handling any of the usual line ending conventions.YRead a file in universal newline mode, handling any of the usual line ending conventions.YRead the given file, or standard input if the path is "-", using universal newline mode.ITotal version of maximum, for integral types, giving 0 for an empty list.  !"#$%&'()*+,-./012`abcdefghijklmnopqrstuvwxyz{|}~#  None:DRAn id identifying which report item field to interpolate. These are drawn from several hledger report types, so are not all applicable for a given report./A posting or balance report item's account name1A posting or register or entry report item's date8A posting or register or entry report item's description`A balance or posting report item's balance or running total. Always rendered right-justified.A balance report item's indent level (which may be different from the account name depth). Rendered as this number of spaces, multiplied by the minimum width spec if any.0A report item's nth field. May be unimplemented.!Literal text to be rendered as-is:A data field to be formatted and interpolated. Parameters:'Left justify ? Right justified if false:Minimum width ? Will be space-padded if narrower than this2Maximum width ? Will be clipped if wider than this?Which of the standard hledger report item fields to interpolateQA format specification/template to use when rendering a report line item as text.A format is a sequence of components; each is either a literal string, or a hledger report item field with specified width and justification whose value will be interpolated at render time.A component's value may be a multi-line string (or a multi-commodity amount), in which case the final string will be either single-line or a top or bottom-aligned multi-line string depending on the StringFormat variant used.yCurrently this is only used in the balance command's single-column mode, which provides a limited StringFormat renderer.?multi-line values will be rendered on one line, comma-separatedAvalues will be top-aligned (and bottom-padded to the same height).values will be bottom-aligned (and top-padded)=Parse a string format specification, or return a parse error. NoneTThe result of running cmdargs: an association list of option names to string values.Is the named option present ?GRaise an error, showing the specified message plus a hint about --help.     None Convert Periods to DateSpans.qperiodAsDateSpan (MonthPeriod 2000 1) == DateSpan (Just $ fromGregorian 2000 1 1) (Just $ fromGregorian 2000 2 1)TrueConvert DateSpans to Periods.[dateSpanAsPeriod $ DateSpan (Just $ fromGregorian 2000 1 1) (Just $ fromGregorian 2000 2 1)MonthPeriod 2000 1 @Convert PeriodBetweens to a more abstract period where possible.JsimplifyPeriod $ PeriodBetween (fromGregorian 1 1 1) (fromGregorian 2 1 1) YearPeriod 1QsimplifyPeriod $ PeriodBetween (fromGregorian 2000 10 1) (fromGregorian 2001 1 1)QuarterPeriod 2000 4PsimplifyPeriod $ PeriodBetween (fromGregorian 2000 2 1) (fromGregorian 2000 3 1)MonthPeriod 2000 2QsimplifyPeriod $ PeriodBetween (fromGregorian 2016 7 25) (fromGregorian 2016 8 1)WeekPeriod 2016-07-25PsimplifyPeriod $ PeriodBetween (fromGregorian 2000 1 1) (fromGregorian 2000 1 2)DayPeriod 2000-01-01QsimplifyPeriod $ PeriodBetween (fromGregorian 2000 2 28) (fromGregorian 2000 3 1)#PeriodBetween 2000-02-28 2000-03-01QsimplifyPeriod $ PeriodBetween (fromGregorian 2000 2 29) (fromGregorian 2000 3 1)DayPeriod 2000-02-29RsimplifyPeriod $ PeriodBetween (fromGregorian 2000 12 31) (fromGregorian 2001 1 1)DayPeriod 2000-12-31 Is this period a "standard" period, referencing a particular day, week, month, quarter, or year ? Periods of other durations, or infinite duration, or not starting on a standard period boundary, are not. ERender a period as a compact display string suitable for user output.1showPeriod (WeekPeriod (fromGregorian 2016 7 25))"2016/07/25w30"fMove a standard period to the following period of same duration. Non-standard periods are unaffected.fMove a standard period to the preceding period of same duration. Non-standard periods are unaffected.Move a standard period to the following period of same duration, staying within enclosing dates. Non-standard periods are unaffected.Move a standard period to the preceding period of same duration, staying within enclosing dates. Non-standard periods are unaffected.iMove a standard period stepwise so that it encloses the given date. Non-standard periods are unaffected.'Enlarge a standard period to the next larger enclosing standard period, if there is one. Eg, a day becomes the enclosing week. A week becomes whichever month the week's thursday falls into. A year becomes all (unlimited). Non-standard periods (arbitrary dates, or open-ended) are unaffected.Shrink a period to the next smaller standard period inside it, choosing the subperiod which contains today's date if possible, otherwise the first subperiod. It goes like this: unbounded periods and nonstandard periods (between two arbitrary dates) -> current year -> current quarter if it's in selected year, otherwise first quarter of selected year -> current month if it's in selected quarter, otherwise first month of selected quarter -> current week if it's in selected month, otherwise first week of selected month -> today if it's in selected week, otherwise first day of selected week, unless that's in previous month, in which case first day of month containing selected week. Shrinking a day has no effect.                    None:DRURender a datespan as a display string, abbreviating into a compact form if possible.Get the current local date.#Get the current local month number.Get the current local year.#?Get overall span enclosing multiple sequentially ordered spans.$Split a DateSpan into one or more consecutive whole spans of the specified length which enclose it. If no interval is specified, the original span is returned. Examples: .let t i d1 d2 = splitSpan i $ mkdatespan d1 d2&t NoInterval "2008/01/01" "2009/01/01"[DateSpan 2008](t (Quarters 1) "2008/01/01" "2009/01/01"A[DateSpan 2008q1,DateSpan 2008q2,DateSpan 2008q3,DateSpan 2008q4]#splitSpan (Quarters 1) nulldatespan [DateSpan -]:t (Days 1) "2008/01/01" "2008/01/01" -- an empty datespan [DateSpan 2008/01/01-2007/12/31](t (Quarters 1) "2008/01/01" "2008/01/01" [DateSpan 2008/01/01-2007/12/31]&t (Months 1) "2008/01/01" "2008/04/01"4[DateSpan 2008/01,DateSpan 2008/02,DateSpan 2008/03]&t (Months 2) "2008/01/01" "2008/04/01"?[DateSpan 2008/01/01-2008/02/29,DateSpan 2008/03/01-2008/04/30]%t (Weeks 1) "2008/01/01" "2008/01/15"F[DateSpan 2007/12/31w01,DateSpan 2008/01/07w02,DateSpan 2008/01/14w03]%t (Weeks 2) "2008/01/01" "2008/01/15"?[DateSpan 2007/12/31-2008/01/13,DateSpan 2008/01/14-2008/01/27]*t (DayOfMonth 2) "2008/01/01" "2008/04/01"^[DateSpan 2008/01/02-2008/02/01,DateSpan 2008/02/02-2008/03/01,DateSpan 2008/03/02-2008/04/01])t (DayOfWeek 2) "2011/01/01" "2011/01/15"?[DateSpan 2011/01/04-2011/01/10,DateSpan 2011/01/11-2011/01/17]%DCount the days in a DateSpan, or if it is open-ended return Nothing.&&Does the span include the given date ?'GDoes the period include the given date ? (Here to avoid import cycle).(4Calculate the intersection of a number of datespans.),Calculate the intersection of two datespans.*rFill any unspecified dates in the first span with the dates from the second one. Sort of a one-way spanIntersect.+-Calculate the union of a number of datespans.,%Calculate the union of two datespans.-zParse a period expression to an Interval and overall DateSpan using the provided reference date, or return a parse error.Show a DateSpan as a human-readable pseudo-period-expression string. dateSpanAsText :: DateSpan -> String dateSpanAsText (DateSpan Nothing Nothing) = "all" dateSpanAsText (DateSpan Nothing (Just e)) = printf "to %s" (show e) dateSpanAsText (DateSpan (Just b) Nothing) = printf "from %s" (show b) dateSpanAsText (DateSpan (Just b) (Just e)) = printf "%s to %s" (show b) (show e)#Convert a single smart date string to a date span using the provided reference date, or raise an error. spanFromSmartDateString :: Day -> String -> DateSpan spanFromSmartDateString refdate s = spanFromSmartDate refdate sdate where sdate = fromparse $ parsewith smartdateonly s/sConvert a smart date string to an explicit yyyy/mm/dd string using the provided reference date, or raise an error.0"A safe version of fixSmartDateStr.2JConvert a SmartDate to an absolute date using the provided reference date. Examples: :set -XOverloadedStrings0let t = fixSmartDateStr (parsedate "2008/11/26")t "0000-01-01" "0000/01/01"t "1999-12-02" "1999/12/02"t "1999.12.02" "1999/12/02" t "1999/3/2" "1999/03/02" t "19990302" "1999/03/02" t "2008/2" "2008/02/01" t "0020/2" "0020/02/01"t "1000" "1000/01/01"t "4/2" "2008/04/02"t "2" "2008/11/02" t "January" "2008/01/01"t "feb" "2008/02/01" t "today" "2008/11/26" t "yesterday" "2008/11/25" t "tomorrow" "2008/11/27" t "this day" "2008/11/26" t "last day" "2008/11/25" t "next day" "2008/11/27"t "this week" -- last monday "2008/11/24"!t "last week" -- previous monday "2008/11/17"t "next week" -- next monday "2008/12/01"t "this month" "2008/11/01"t "last month" "2008/10/01"t "next month" "2008/12/01"t "this quarter" "2008/10/01"t "last quarter" "2008/07/01"t "next quarter" "2009/01/01" t "this year" "2008/01/01" t "last year" "2007/01/01" t "next year" "2009/01/01"t "last wed" "20081119" t "next friday" "20081128" t "next january" "20090101"45Parse a couple of date string formats to a time type.5Parse a YYYY-MM-DD or YYYYMMBDD date string to a Day, or raise an error. For testing/debugging.parsedate "2008/02/03" 2008-02-03VParse a time string to a time type using the provided pattern, or return the default.6aParse a date in any of the formats allowed in ledger's period expressions, and maybe some others: q2004 2004/10 2004/10/1 10/1 21 october, oct yesterday, today, tomorrow this/next/last week/day/month/quarter/yearReturns a SmartDate, to be converted to a full date later (see fixSmartDate). Assumes any text in the parse stream has been lowercased.OLike smartdate, but there must be nothing other than whitespace after the date.vlet p = parsewith (periodexpr (parsedate "2008/11/26")) :: T.Text -> Either (ParseError Char Dec) (Interval, DateSpan)p "from aug to oct"1Right (NoInterval,DateSpan 2008/08/01-2008/09/30)p "aug to oct"1Right (NoInterval,DateSpan 2008/08/01-2008/09/30)p "every 3 days in aug"Right (Days 3,DateSpan 2008/08)p "daily from aug"#Right (Days 1,DateSpan 2008/08/01-)p "every week to 2009"$Right (Weeks 1,DateSpan -2008/12/31)<mMake a datespan from two valid date strings parseable by parsedate (or raise an error). Eg: mkdatespan "201111" "20111231".] !"#$%&'()*+,-./0123456789:;<=>?$ !"#$%&'()*+,-./0123456789:;<=>$>&'45 3-=9:;87!"#)(*,+6$2/01%.<] !"#$%&'()*+,-./0123456789:;<=>?NoneD6Look up one of the sample commodities' symbol by name.EFFind the conversion rate between two commodities. Currently returns 1.@ABCDEF@ABCDEF@ABCDEF@ABCDEFNone!"/1HThe empty simple amount.IThe empty simple amount.JHA temporary value for parsed transactions which had no amount specified.Apply a binary arithmetic operator to two amounts, which should be in the same commodity if non-zero (warning, this is not checked). A zero result keeps the commodity of the second amount. The result's display style is that of the second amount, with precision set to the highest of either amount. Prices are ignored and discarded. Remember: the caller is responsible for ensuring both amounts have the same commodity.R~Convert an amount to the specified commodity, ignoring and discarding any assigned prices and assuming an exchange rate of 1.SIConvert an amount to the commodity of its assigned price, if any. Notes:kprice amounts must be MixedAmounts with exactly one component Amount (or there will be a runtime error) XXXGprice amounts should be positive, though this is not currently enforcedT*Divide an amount's quantity by a constant.U/Is this amount negative ? The price is ignored.VLDoes this amount appear to be zero when displayed with its given precision ?WCIs this amount "really" zero, regardless of the display precision ?|Get the string representation of an amount, based on its commodity's display settings except using the specified precision.X"Set an amount's display precision.Y+Set an amount's display precision, flipped.ZxGet a string representation of an amount for debugging, appropriate to the current debug level. 9 shows maximum detail.[@Get the string representation of an amount, without any @ price.RGet the string representation of an amount, without any price or commodity symbol.\Get the string representation of an amount, based on its commodity's display settings. String representations equivalent to zero are converted to just "0". The special "missing" amount is displayed as the empty string.]BLike showAmount, but show a zero amount's commodity if it has one.qGet the string representation of the number part of of an amount, using the display settings from its commodity.Replace a number string's decimal point with the specified character, and add the specified digit group separators. The last digit group will be repeated as needed.^OFor rendering: a special precision value which means show all available digits._QFor rendering: a special precision value which forces display of a decimal point.`NCanonicalise an amount's display style using the provided commodity style map.aThe empty mixed amount.bHA temporary value for parsed transactions which had no amount specified.cEConvert amounts in various commodities into a normalised MixedAmount.d,Simplify a mixed amount's component amounts:\amounts in the same commodity are combined unless they have different prices or total pricesmultiple zero amounts, all with the same non-null commodity, are replaced by just the last of them, preserving the commodity and amount style (all but the last zero amount are discarded)rmultiple zero amounts with multiple commodities, or no commodities, are replaced by one commodity-less zero amountBan empty amount list is replaced by one commodity-less zero amount4the special "missing" mixed amount remains unchangedeLike normaliseMixedAmount, but combine each commodity's amounts into just one by throwing away all prices except the first. This is only used as a rendering helper, and could show a misleading price.Sum same-commodity amounts in a lossy way, applying the first price to the result and discarding any other prices. Only used as a rendering helper.f'Get a mixed amount's component amounts.g9Filter a mixed amount's component amounts by a predicate.hReturn an unnormalised MixedAmount containing exactly one Amount with the specified commodity and the quantity of that commodity found in the original. NB if Amount's quantity is zero it will be discarded next time the MixedAmount gets normalised.i]Convert a mixed amount's component amounts to the commodity of their assigned price, if any.j1Divide a mixed amount's quantities by a constant.k,Calculate the average of some mixed amounts.lNIs this mixed amount negative, if it can be normalised to a single commodity ?mRDoes this mixed amount appear to be zero when displayed with its given precision ?n<Is this mixed amount "really" zero ? See isReallyZeroAmount.oZIs this mixed amount "really" zero, after converting to cost commodities where possible ?pGet the string representation of a mixed amount, after normalising it to one amount per commodity. Assumes amounts have no or similar prices, otherwise this can show misleading prices.qXLike showMixedAmount, but zero amounts are shown with their commodity if they have one.r9Get the one-line string representation of a mixed amount.s8Compact labelled trace of a mixed amount, for debugging.t6Set the display precision in the amount's commodities.uGet the string representation of a mixed amount, showing each of its component amounts with the specified precision, ignoring their commoditys' display precision settings.vIGet an unambiguous string representation of a mixed amount for debugging.wKGet the string representation of a mixed amount, but without any @ prices.xTGet the one-line string representation of a mixed amount, but without any @ prices.yTCanonicalise a mixed amount's display styles using the provided commodity style map.HGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~4GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz4HIJKMNOLPQRSTG\]Z[^_XY`abcfghedijkUlVWmnoprvwxqutyszHGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NoneDTruncate all account name components but the last to two characters.  "a:b:c","d:e" -> ["a","a:b","a:b:c","d","d:e"]"a:b:c" -> ["a","a:b","a:b:c"]  "a:b:c","d:e" -> ["a","d"]UIs the first account a parent or other ancestor of (and not the same as) the second ?cFrom a list of account names, select those which are direct subaccounts of the given account name.*Convert a list of account names to a tree.OElide an account name to fit in the specified width. From the ledger 2.6 news: ] What Ledger now does is that if an account name is too long, it will start abbreviating the first parts of the account name down to two letters in length. If this results in a string that is still too long, the front will be elided -- not the end. For example: Expenses:Cash ; OK, not too long Ex:Wednesday:Cash ; Expenses6 was abbreviated to fit Ex:We:Afternoon:Cash ; Expenses and  Wednesday abbreviated ; Expenses:Wednesday:Afternoon:Lunch:Snack:Candy:Chocolate:Cash ..:Af:Lu:Sn:Ca:Ch:Cash ; Abbreviated and elided! yKeep only the first n components of an account name, where n is a positive integer. If n is 0, returns the empty string.nKeep only the first n components of an account name, where n is a positive integer. If n is 0, returns "...".PConvert an account name to a regular expression matching it and its subaccounts.TConvert an account name to a regular expression matching it but not its subaccounts.MConvert an exact account-matching regular expression to a plain account name.IDoes this string look like an exact account-matching regular expression ?None Remove all prices of a postingGet a posting's (primary) date - it's own primary date if specified, otherwise the parent transaction's primary date, or the null date if there is no parent transaction.Get a posting's secondary (secondary) date, which is the first of: posting's secondary date, transaction's secondary date, posting's primary date, transaction's primary date, or the null date if there is no parent transaction.Get a posting's cleared status: cleared or pending if those are explicitly set, otherwise the cleared status of its parent transaction, or uncleared if there is no parent transaction. (Note Uncleared's ambiguity, it can mean "uncleared" or "don't know".JTags for this posting including any inherited from its parent transaction.:Tags for this transaction including any from its postings.3Does this posting fall within the given date span ?dGet the minimal date span which contains all the postings, or the null date span if there are none.`Prefix one account name to another, preserving posting type indicators like concatAccountNames.Join account names into one. If any of them has () or [] posting type indicators, these (the first type encountered) will also be applied to the resulting account name.Rewrite an account name using all matching aliases from the given list, in sequence. Each alias sees the result of applying the previous aliases.=Memoising version of accountNameApplyAliases, maybe overkill."  "None: jShow a journal transaction, formatted for the print command. ledger 2.x's standard format looks like this: yyyymmdd[ *][ CODE] description......... [ ; comment...............] account name 1..................... ...$amount1[ ; comment...............] account name 2..................... ..$-amount1[ ; comment...............] pcodewidth = no limit -- 10 -- mimicking ledger layout. pdescwidth = no limit -- 20 -- I don't remember what these mean, pacctwidth = 35 minimum, no maximum -- they were important at the time. pamtwidth = 11 pcommentwidth = no limit -- 22 Show an account name, clipped to the given width if any, and appropriately bracketed/parenthesised for the given posting type.MGet the sums of a transaction's real, virtual, and balanced virtual postings.Is this transaction balanced ? A balanced transaction's real (non-virtual) postings sum to 0, and any balanced virtual postings also sum to 0.Ensure this transaction is balanced, possibly inferring a missing amount or conversion price(s), or return an error message. Balancing is affected by commodity display precisions, so those can (optionally) be provided.athis fails for example, if there are several missing amounts (possibly with balance assignments)More general version of  that takes an update functionInfer up to one missing amount for this transactions's real postings, and likewise for its balanced virtual postings, if needed; or return an error message if we can't.We can infer a missing amount when there are multiple postings and exactly one of them is amountless. If the amounts had price(s) the inferred amount have the same price(s), and will be converted to the price commodity. Infer prices for this transaction's posting amounts, if needed to make the postings balance, and if possible. This is done once for the real postings and again (separately) for the balanced virtual postings. When it's not possible, the transaction is left unchanged.The simplest example is a transaction with two postings, each in a different commodity, with no prices specified. In this case we'll add a price to the first posting such that it can be converted to the commodity of the second posting (with -B), and such that the postings balance.&In general, we can infer a conversion price when the sum of posting amounts contains exactly two different commodities and no explicit prices. Also all postings are expected to contain an explicit amount (no missing amounts) in a single commodity. Otherwise no price inferring is attempted.The transaction itself could contain more than two commodities, and/or prices, if they cancel out; what matters is that the sum of posting amounts contains exactly two commodities and zero prices.FThere can also be more than two postings in either of the commodities.We want to avoid excessive display of digits when the calculated price is an irrational number, while hopefully also ensuring the displayed numbers make sense if the user does a manual calculation. This is (mostly) achieved in two ways:when there is only one posting in the "from" commodity, a total price (@@) is used, and all available decimal digits are shownotherwise, a suitable averaged unit price (@) is applied to the relevant postings, with display precision equal to the summed display precisions of the two commodities being converted between, or 2, whichever is larger.'(We don't always calculate a good-looking display precision for unit prices when the commodity display precisions are low, eg when a journal doesn't use any decimal places. The minimum of 2 helps make the prices shown by the print command a bit less surprising in this case. Could do better.)Generate a posting update function which assigns a suitable balancing price to the posting, if and as appropriate for the given transaction and posting type (real or balanced virtual).ZEnsure a transaction's postings refer back to it, so that eg relatedPostings works right.qEnsure a transaction's postings do not refer back to it, so that eg recursiveSize and GHCI's :sprint work right.#Set a posting's parent transaction.%update functionupdate function%NoneConvert time log entries to journal transactions. When there is no clockout, add one with the provided current time. Sessions crossing midnight are split into days to give accurate per-day totals.Convert a timeclock clockin and clockout entry to an equivalent journal transaction, representing the time expenditure. Note this entry is not balanced, since we omit the "assets:time" transaction for simpler output.None$01A query option changes a query 's/report'#s behaviour and output in some way.1show an account register focussed on this accountas above but include sub-accounts in the account register | QueryOptCostBasis -- ^ show amounts converted to cost where possible | QueryOptDate2 -- ^ show secondary dates instead of primary datessA query is a composition of search criteria, which can be used to match postings, transactions, accounts and more. always match never matchnegate this matchmatch if any of these matchmatch if all of these match!match if code matches this regexp(match if description matches this regexp0match postings whose account matches this regexp'match if primary date in this date span)match if secondary date in this date spanamatch txns/postings with this cleared status (Status Uncleared matches all states except cleared)Jmatch if "realness" (involves a real non-virtual account ?) has this value3match if the amount's numeric quantity is less than greater than'equal to/unsignedly equal to some value>match if the entire commodity symbol is matched by this regexpyif true, show zero-amount postings/accounts which are usually not shown more of a query option than a query criteria ?match if account depth is less than or equal to this value. Depth is sometimes used like a query (for filtering report data) and sometimes like a query option (for controlling display)match if a tag's name, and optionally its value, is matched by these respective regexps matching the regexp if provided, existsConvert a query expression containing zero or more space-separated terms to a query and zero or more query options. A query term is either: :a search pattern, which matches on one or more fields, eg:acct:REGEXP - match the account name with a regular expression desc:REGEXP - match the transaction description date:PERIODEXP - match the date with a period expression^The prefix indicates the field to match, or if there is no prefix account name is assumed. a query option, which modifies the reporting behaviour in some way. There is currently one of these, which may appear only once:inacct:FULLACCTNAMEThe usual shell quoting rules are assumed. When a pattern contains whitespace, it (or the whole term including prefix) should be enclosed in single or double quotes.ePeriod expressions may contain relative dates, so a reference date is required to fully parse these.Multiple terms are combined as follows: 1. multiple account patterns are OR'd together 2. multiple description patterns are OR'd together 3. then all terms are AND'd togetherQuote-and-prefix-aware version of words - don't split on spaces which are inside quotes, including quotes which may have one of the specified prefixes in front, and maybe an additional not: prefix in front of that.kParse a single query term as either a query or a query option, or raise an error if it has invalid syntax.>Parse the value part of a "status:" query, or return an error.xParse the boolean value part of a "status:" query. "1" means true, anything else will be parsed as false without error.Remove query terms (or whole sub-expressions) not matching the given predicate from this query. XXX Semantics not completely clear."Does this query match everything ?Does this query specify a start date and nothing else (that would filter postings prior to the date) ? When the flag is true, look for a starting secondary date instead.What start date (or secondary date) does this query specify, if any ? For OR expressions, use the earliest of the dates. NOT is ignored.What end date (or secondary date) does this query specify, if any ? For OR expressions, use the latest of the dates. NOT is ignored.What date span (or secondary date span) does this query specify ? For OR expressions, use the widest possible span. NOT is ignored.TExtract all date (or secondary date) spans specified in this query. NOT is ignored.What date span (or secondary date span) does this query specify ? For OR expressions, use the widest possible span. NOT is ignored.TExtract all date (or secondary date) spans specified in this query. NOT is ignored.>What is the earliest of these dates, where Nothing is latest ?>What is the latest of these dates, where Nothing is earliest ?8What is the earliest of these dates, ignoring Nothings ?6What is the latest of these dates, ignoring Nothings ?-Compare two maybe dates, Nothing is earliest.@The depth limit this query specifies, or a large number if none.~The account we are currently focussed on, if any, and whether subaccounts are included. Just looks at the first query option.gA query for the account(s) we are currently focussed on, if any. Just looks at the first query option.aDoes the match expression match this account ? A matching in: clause is also considered a match.6Does the match expression match this (simple) amount ?Is this simple (single-amount) mixed amount's quantity less than, greater than, equal to, or unsignedly equal to this number ? For multi-amount (multiple commodities, or just unsimplified) mixed amounts this is always true.aIs this amount's quantity less than, greater than, equal to, or unsignedly equal to this number ?.Does the match expression match this posting ?2Does the match expression match this transaction ?XFilter a list of tags by matching against their names and optionally also their values.[       1 1 >        None/OT/Monad transformer stack with a reference to a mutable hashtable of current account balances and a mutable array of finished transactions in original parsing order. Environment for WGet the transaction with this index (its 1-based position in the input stream), if any.YGet the transaction that appeared immediately after this one in the input stream, if any.ZGet the transaction that appeared immediately before this one in the input stream, if any.5Unique transaction descriptions used in this journal.8All postings from this journal's transactions, in order./Unique account names posted to in this journal. WUnique account names in this journal, including parent accounts containing no postings.!8A query for Profit & Loss accounts in this journal. Cf  Ghttp://en.wikipedia.org/wiki/Chart_of_accounts#Profit_.26_Loss_accounts."sA query for Income (Revenue) accounts in this journal. This is currently hard-coded to the case-insensitive regex ^(income|revenue)s?(:|$).#jA query for Expense accounts in this journal. This is currently hard-coded to the case-insensitive regex ^expenses?(:|$).$DA query for Asset, Liability & Equity accounts in this journal. Cf  Ehttp://en.wikipedia.org/wiki/Chart_of_accounts#Balance_Sheet_Accounts.%hA query for Asset accounts in this journal. This is currently hard-coded to the case-insensitive regex  ^assets?(:|$).&lA query for Liability accounts in this journal. This is currently hard-coded to the case-insensitive regex ^(debts?|liabilit(y|ies))(:|$).'iA query for Equity accounts in this journal. This is currently hard-coded to the case-insensitive regex  ^equity(:|$).(A query for Cash (-equivalent) accounts in this journal (ie, accounts which appear on the cashflow statement.) This is currently hard-coded to be all the Asset accounts except for those containing the case-insensitive regex (receivable|A/R).)5Keep only transactions matching the query expression.*ZKeep only postings matching the query expression. This can leave unbalanced transactions.+nWithin each posting's amount, keep only the parts matching the query. This can leave unbalanced transactions.,|Filter out all parts of this transaction's amounts which do not match the query. This can leave the transaction unbalanced.-KFilter out all parts of this posting's amount which do not match the query./YApply additional account aliases (eg from the command-line) to all postings in a journal.0Do post-parse processing on a parsed journal to make it ready for use. Reverse parsed data to normal order, canonicalise amount formats, check/ensure that transactions are balanced, and maybe check balance assertions.!RNumber (set the tindex field) this journal's transactions, counting upward from 1."Tie the knot in all of this journal's transactions, ensuring their postings refer to them. This should be done last, after any other transaction-modifying operations.2qUntie all transaction-posting knots in this journal, so that eg recursiveSize and GHCI's :sprint can work on it.3]Check any balance assertions in the journal and return an error message if any of them fail.#ECheck a posting's balance assertion and return an error if it fails.4Fill in any missing amounts and check that all journal transactions balance, or return an error message. This is done after parsing all amounts and applying canonical commodity styles, since balancing depends on display precision. Reports only the first error encountered.$LGeneralization used in the definition of 'journalBalanceTransactionsST and 3%This converts a transaction into a list of objects whose dates have to be considered when checking balance assertions and handled by &.Transaction without balance assignments can be balanced and stored immediately and their (possibly) dated postings are returned.MTransaction with balance assignments are only supported if no posting has a \ value. Supported transactions will be returned unchanged and balanced and stored later in &.&This function takes different objects describing changes to account balances on a single day. It can handle either a single posting (from an already balanced transaction without assigments) or a whole transaction with assignments (which is required to no posting with pdate set.).For a single posting, there is not much to do. Only add its amount to its account and check the assertion, if there is one. This functionality is provided by '.CFor a whole transaction, it loops over all postings, and performs ', if there is an amount. If there is no amount, the amount is inferred by the assertion or left empty if there is no assertion. Then, the transaction is balanced, the inferred amount added to the balance (all in e) and the resulting transaction with no missing amounts is stored in the array, for later retrieval.Again in short:'Left Posting': Check the balance assertion and update the account balance. If the amount is empty do nothing. this can be the case e.g. for virtual postingsm'Right Transaction': Loop over all postings, infer their amounts and then balance and store the transaction.'Adds a posting's amonut to the posting's account balance and checks a possible balance assertion. If there is no amount, it runs the supplied fallback action.(]Sets an account's balance to a given amount and returns the difference of new and old amount)IAdds an amount to an account's balance and returns the resulting balance*IStores a transaction in the transaction array in original parsing order.+Helper function5Choose and apply a consistent display format to the posting amounts in each commodity. Each commodity's format is specified by a commodity format directive, or otherwise inferred from posting amounts as in hledger < 0.28.,-Get this journal's standard display style for the given commodity. That is the style defined by the last corresponding commodity format directive if any, otherwise the style inferred from the posting amounts (or in some cases, price amounts) in this commodity if any, otherwise the default style.-Infer a display format for each commodity based on the amounts parsed. "hledger... will use the format of the first posting amount in the commodity, and the highest precision of all posting amounts in the commodity."6vGiven a list of amounts in parse order, build a map from their commodity names to standard commodity display formats.7Given an ordered list of amount styles, choose a canonical style. That is: the style of the first, and the maximum precision of all.8LConvert all this journal's amounts to cost by applying their prices, if any.9rGet an ordered list of the amounts in this journal which will influence amount style canonicalisation. These are:3amounts in market price directives (in parse order)$amounts in postings (in parse order)Amounts in default commodity directives also influence canonicalisation, but earlier, as amounts are parsed. Amounts in posting prices are not used for canonicalisation.:The fully specified date span enclosing the dates (primary or secondary) of all this journal's transactions and postings, or DateSpan Nothing Nothing if there are none.;Check if a set of hledger account/description filter patterns matches the given account name or entry description. Patterns are case-insensitive regular expressions. Prefixed with not:, they become anti-patterns.G ./0123 4!"#$%&'()*+,-./01!"23#4$creates transaction store"store" operation"calculate result from transactions%&'+action to execute, if posting has no amount()*+5,-6789:5;678<=>?+ !"#$%&'()*+,-./0123456789:;<=+/45680)*+,.- 9:$!"#%&'(7;312<=B ./0123 4!"#$%&'()*+,-./01!"23#4$%&'()*+5,-6789:5;678<=>?None!"/A@Derive 1. an account tree and 2. each account's total exclusive and inclusive changes from a list of postings. This is the core of the balance command (and of *ledger). The accounts are returned as a list in flattened tree order, and also reference each other as a tree. (The first account is the root of the tree.)B.Convert an AccountName tree to an Account treeC;Tie the knot so all subaccounts' parents are set correctly.DDGet this account's parent accounts, from the nearest up to the root.E4List the accounts at each level of the account tree.FIMap a (non-tree-structure-modifying) function over this and sub accounts.GAIs the predicate true on any of this account or its subaccounts ?H5Add subaccount-inclusive balances to an account tree.I-Remove all subaccounts below a certain depth.JRemove subaccounts below the specified depth, aggregating their balance at the depth limit (accounts at the depth limit will have any sub-balances merged into their exclusive balance).K;Remove all leaf accounts and subtrees matching a predicate.LFlatten an account tree into a list, which is sometimes convenient. Note since accounts link to their parents/subs, the tree's structure remains intact and can still be used. It's a tree/list!M#Filter an account tree (to a list).NSearch an account list by name.@ABCDEFGHIJKLMNOPQRSTU@ABCDEFGHIJKLMNOPQRSUT@ABCDEFGHIJKLMNOPQRS@ABCDEFGHIJKLMNOPQRSTUNone WFilter a journal's transactions with the given query, then derive a ledger containing the chart of accounts and balances. If the query includes a depth limit, that will affect the ledger's journal but not the ledger's account tree.XList a ledger's account names.Y$Get the named account from a ledger.ZGet this ledger's root account, which is a dummy "root" account above all others. This should always be first in the account list, if somehow not this returns a null account.[LList a ledger's top-level accounts (the ones below the root), in tree order.\GList a ledger's bottom-level (subaccount-less) accounts, in tree order.]AAccounts in ledger whose name matches the pattern, in tree order.^.List a ledger's postings, in the order parsed._The (fully specified) date span containing all the ledger's (filtered) transactions, or DateSpan Nothing Nothing if there are none.`$All commodities used in this ledger.VWXYZ[\]^_`abc VWXYZ[\]^_`abcVWXYZ[\]^_`abVWXYZ[\]^_`abcNoned6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghkijlmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz !"#$%&'()*+,-./0123456789:;<=@ABCDEFGHIJKLMNOPQRSVWXYZ[\]^_`abdddNone !"#:LTe8Run a string parser with no state in the identity monad.f8Run a string parser with no state in the identity monad.g7Run a journal parser with a null journal-parsing state.h7Run a journal parser with a null journal-parsing state.iFRun an error-raising journal parser with a null journal-parsing state.jFRun an error-raising journal parser with a null journal-parsing state.lGiven a megaparsec ParsedJournal parser, balance assertion flag, file path and file content: parse and post-process a Journal, or give an error.zgTerminate parsing entirely, returning the given error message with the given parse position prepended.~Parse a date in YYYYMMDD format. Hyphen (-) and period (.) are also allowed as separators. The year may be omitted if a default year has been set. Leading zeroes may be omitted.Parse a date and time in YYYYMM<DD HH:MM[:SS][+-ZZZZ] format. Hyphen (-) and period (.) are also allowed as date separators. The year may be omitted if a default year has been set. Seconds are optional. The timezone is optional and ignored (the time is always interpreted as a local time). Leading zeroes may be omitted (except in a timezone). 1> parsewith twoorthreepartdatestringp "2016/01/2" Right "201601n2" twoorthreepartdatestringp = do n1 <- some digitChar c <- datesepchar n2 <- some digitChar mn3  -optional $ char c<> some digitChar return $ n1 ++ c:n2 ++ maybe "" (c:) mn3gParse an account name, then apply any parent account prefix and/or account aliases currently in effect.KParse an account name. Account names start with a non-space, may have single spaces inside them, and are terminated by two or more spaces (or end of input). Also they have one or more components of at least one character, separated by the account separator char. (This parser will also consume one following space, if present.)Parse whitespace then an amount, with an optional left or right currency symbol and optional price, or return the special "missing" marker amount.Parse a single-commodity amount, with optional symbol on the left or right, optional unit or total price, and optional (ignored) ledger-style balance assertion or fixed lot price declaration./Parse an amount from a string, or get an error.4Parse a mixed amount from a string, or get an error.PParse a string representation of a number for its value and display attributes.Some international number formats are accepted, eg either period or comma may be used for the decimal point, and the other of these may be used for separating digit groups in the integer part. See  .http://en.wikipedia.org/wiki/Decimal_separator for more examples.This returns: the parsed numeric value, the precision (number of digits seen following the decimal point), the decimal point character used if any, and the digit group style if any.:Parse a possibly multi-line comment following a semicolon.Parse a possibly multi-line comment following a semicolon, and any tags and/or posting dates within it. Posting dates can be expressed with "date""date2" tags andor bracketed dates. The dates are parsed in full here so that errors are reported in the right position. Missing years can be inferred if a default date is provided.Yrejp (followingcommentandtagsp (Just $ fromGregorian 2000 1 2)) "; a:b, date:3/4, [=5/6]"\Right ("a:b, date:3/4, [=5/6]\n",[("a","b"),("date","3/4")],Just 2000-03-04,Just 2000-05-06)Year unspecified and no default provided -> unknown year error, at correct position: >>> rejp (followingcommentandtagsp Nothing) " ; xxx date:3/4n ; second line" Left ...1:22...partial date 3/4 found, but the current year is unknown...Date tag value contains trailing text - forgot the comma, confused: the syntaxes ? We'll accept the leading date anyway >>> rejp (followingcommentandtagsp (Just $ fromGregorian 2000 1 2)) "; date:34=56" Right ("date:34=56n",[("date","34=56")],Just 2000-03-04,Nothing)MExtract any tags (name:value ended by comma or newline) embedded in a string.commentTags "a b:, c:c d:d, e"[("b",""),("c","c d:d")]QcommentTags "a [1/1/1] [1/1] [1], [=1/1/1] [=1/1] [=1] [1/1=1/1/1] [1=1/1/1] b:c" [("b","c")] -[("date","111"),("date","11"),("date2","111"),("date2","11"),("date","11"),("date2","111"),("date","1"),("date2","11/1")]commentTags "\na b:, \nd:e, f"[("b",""),("d","e")]!Parse all tags found in a string.'Parse everything up till the first tag.rtp nontagp "\na b:, \nd:e, f" Right "\na "Tags begin with a colon-suffixed tag name (a word beginning with a letter) and are followed by a tag value (any text up to a comma or newline, whitespace-stripped).!rtp tagp "a:b b , c AuxDate: 4/2"Right ("a","b b")rtp tagnamep "a:" Right "a"TParse all posting dates found in a string. Posting dates can be expressed with datedate2 tags andor bracketed dates. The dates are parsed fully to give useful errors. Missing years can be inferred only if a default date is provided.Date tags are tags with name "date" or "date2". Their value is parsed as a date, using the provided default date if any for inferring a missing year if needed. Any error in date parsing is reported and terminates parsing.)rejp (datetagp Nothing) "date: 2000/1/2 "Right ("date",2000-01-02);rejp (datetagp (Just $ fromGregorian 2001 2 3)) "date2:3/4"Right ("date2",2001-03-04)$rejp (datetagp Nothing) "date: 3/4"HLeft ...1:9...partial date 3/4 found, but the current year is unknown...#Parse Ledger-style bracketed posting dates ([DATE=DATE2]), as "date" and/or "date2" tags. Anything that looks like an attempt at this (a square-bracketed sequence of 0123456789/-.= containing at least one digit and one date separator) is also parsed, and will throw an appropriate error.The dates are parsed in full here so that errors are reported in the right position. A missing year in DATE can be inferred if a default date is provided. A missing year in DATE2 will be inferred from DATE.2rejp (bracketeddatetagsp Nothing) "[2016/1/2=3/4]"0Right [("date",2016-01-02),("date2",2016-03-04)]'rejp (bracketeddatetagsp Nothing) "[1]"Left ...not a bracketed date.../rejp (bracketeddatetagsp Nothing) "[2016/1/32]"&Left ...1:11:...bad date: 2016/1/32...*rejp (bracketeddatetagsp Nothing) "[1/31]"JLeft ...1:6:...partial date 1/31 found, but the current year is unknown...8rejp (bracketeddatetagsp Nothing) "[0123456789/-.=/-.=]"1Left ...1:15:...bad date, different separators...>efghijklmnopqrstuvwxyz{|}~>efghijklmnopqrstuvwxyz{|}~>efghijklmnopqrstuvwxyz{|}~>efghijklmnopqrstuvwxyz{|}~None $9:;DRT9A set of data definitions and account-matching patterns sufficient to convert a particular CSV data file into meaningful journal transactions.:Parse and post-process a Journal` from CSV data, or give an error. XXX currently ignores the string and reads from the file path;zRead a Journal from the given CSV data (and filename, used for error messages), or return an error. Proceed as follows: [ 1. parse the CSV data 2. identify the name of a file specifying conversion rules: either use the name provided, derive it from the CSV filename, or raise an error if the CSV filename is -. 3. auto-create the rules file with default rules if it doesn't exist 4. parse the rules file 5. convert the CSV records to a journal using the rules <:Return the cleaned up and validated CSV data, or an error.=}Pre-parse csv rules to interpolate included files, recursively. This is a cheap hack to avoid rewriting the existing parser.>(Return the validated rules, or an error.?;Show a (approximate) recreation of the original CSV record.@MGiven the conversion rules, a CSV record and a journal entry field name, find the template value ultimately assigned to this field, either at top level or in a matching conditional block. Conditional blocks' patterns are matched against an approximation of the original CSV record: all the field values with commas intercalated.GABCDEFGHIJ9KLMNO:;P<QRSTUVWXYZ[=\>]^_`abcdefghijklmnopqrstu?@vwxBABCDEFGHIJ9KLMNO:;P<QRSTUVWXYZ[=\>]^_`abcdefghijklmnopqrstu?@vwxNone !"#:LTy4Generate an action that parses and post-processes a Journal0 from a C++ Ledger journal, or raises an error.z/Convert a ledger4 RawEntityInSitu - representing a parsed transaction, directive, comment etc. - into either a journal update function or an error. Currently converts only transactions, and ignores some transaction fields. Runs in IO because it uses some hledger parsers that have some need for that.{Convert a ledger4 RawPosting to a hledger Posting or an error message. Currently ignores some posting fields, and the RawPostingNote variant (which represents a comment line, not a posting; returns Nothing for these).yz{yz{None|Parse and post-process a Journaln from timeclock.el's timeclock format, saving the provided file path and the current time, or give an error.}Parse a timeclock entry.|}|}None~Parse and post-process a Journal+ from the timedot format, or give an error.KParse timedot day entries to zero or more time transactions for that day. Y 2/1 fos.haskell .... .. biz.research . inc.client1 .... .... .... .... .... .... =Parse a single timedot entry to one (dateless) transaction.  fos.haskell .... .. ^Parse a duration written as a decimal number of hours (optionally followed by the letter h).  1.5h EParse a quantity written as a line of dots, each representing 0.25.  .... .. ~ ~None !"#:LT Parse and post-process a Journal7 from hledger's journal file format, or give an error.,A journal parser. Accumulates and returns a  ParsedJournal2, which should be finalised/validated before use.*rejp (journalp <* eof) "2015/1/1\n a 0\n".Right Journal with 1 transactions, 1 accountsbA side-effecting parser; parses any kind of journal item and updates the parse state accordingly.HParse any journal directive and update the parse state accordingly. Cf  )http://hledger.org/manual.html#directives, =http://ledger-cli.org/3.0/doc/ledger3.html#Command-DirectivesfLift an IO action into the exception monad, rethrowing any IO error with the given message prepended.3Parse a one-line or multi-line commodity directive.5Right _ <- rejp commoditydirectivep "commodity $1.00"ARight _ <- rejp commoditydirectivep "commodity $\n format $1.00"SRight _ <- rejp commoditydirectivep "commodity $\n\n" -- a commodity with no format]Right _ <- rejp commoditydirectivep "commodity $1.00\n format $1.00" -- both, what happens ?%Parse a one-line commodity directive.<Right _ <- rejp commoditydirectiveonelinep "commodity $1.00"ERight _ <- rejp commoditydirectiveonelinep "commodity $1.00 ; blah\n"RParse a multi-line commodity directive, containing 0 or more format subdirectives.YRight _ <- rejp commoditydirectivemultilinep "commodity $ ; blah \n format $1.00 ; blah"bParse a format (sub)directive, throwing a parse error if its symbol does not match the one given.*Parse a (possibly unbalanced) transaction."ghijklu{~klghiju~{" NoneT ]A file path optionally prefixed by a reader name and colon (journal:, csv:, timedot:, etc.).NRead the default journal file specified by the environment, or raise an error.#Get the default journal file path specified by the environment. Like ledger, we look first for the LEDGER_FILE environment variable, and if that does not exist, for the legacy LEDGER environment variable. If neither is set, or the value is blank, return the hard-coded default, which is .hledger.journalh in the users's home directory (or in the current directory, if we cannot determine a home directory). 7readJournalFiles mformat mrulesfile assrt prefixedfileslRead a Journal from each specified file path and combine them into one. Or, return the first error message.Combining Journals means concatenating them, basically. The parse state resets at the start of each file, which means that directives & aliases do not cross file boundaries. (The final parse state saved in the Journal does span all files, however.)TAs with readJournalFile, file paths can optionally have a READER: prefix, and the mformat, mrulesfile, and Eassrt@ arguments are supported (and these are applied to all files). 5readJournalFile mformat mrulesfile assrt prefixedfileRead a Journal from this file, or from stdin if the file path is -, or return an error message. The file path can have a READER: prefix.FThe reader (data format) is chosen based on (in priority order): the mformat argument; the file path's READER: prefix, if any; a recognised file name extension (in readJournal); if none of these identify a known reader, all built-in readers are tried in turn.A CSV conversion rules file ( mrulesfiles,) can be specified to help convert CSV data.BOptionally, any balance assertions in the journal can be checked (assrt).sIf a filepath is prefixed by one of the reader names and a colon, split that off. Eg "csv:-" -> (Just "csv", "-").^If the specified journal file does not exist (and is not "-"), give a helpful error and quit.REnsure there is a journal file at the given path, creating an empty one if needed.5Give the content for a new auto-created journal file.QRead a Journal from the given text trying all readers in turn, or throw an error. .readJournal mformat mrulesfile assrt mfile txt:Read a Journal from some text, or return an error message.FThe reader (data format) is chosen based on (in priority order): the mformat0 argument; a recognised file name extension in mfile (if provided). If none of these identify a known reader, all built-in readers are tried in turn (returning the first one's error message if none of them succeed).A CSV conversion rules file ( mrulesfiles,) can be specified to help convert CSV data.BOptionally, any balance assertions in the journal can be checked (assrt). findReader mformat mpathFind the reader named by mformato, if provided. Or, if a file path is provided, find the first reader that handles its file extension, if any. *tryReaders readers mrulesfile assrt path tTry to parse the given text to a Journal using each reader in turn, returning the first success, or if all of them fail, the first error message.Lefghijklmnopqrstuvwxyz{|}~!None!"0Standard options for customising report filtering and output, corresponding to hledger's command-line options and query language arguments. Used in hledger-lib and above.aShould accounts be displayed: in the command's default style, hierarchically, or as a flat list ?3Which "balance" is being shown in a balance report.%The change of balance in each period./The accumulated change across multiple periods.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.PDo extra validation of raw option values, raising an error if there's a problem.MDo extra validation of report options, raising an error if there's a problem.JGet the report interval, if any, specified by the last of -p/--period, -D --daily, -W$--weekly, -M/--monthly etc. options.jGet the cleared status, if any, specified by the last of -C/--cleared, --pending, -U/--uncleared options.6Select the Transaction date accessor based on --date2.2Select the Posting date accessor based on --date2.5Report which date we will report on based on --date2.;Legacy-compatible convenience aliases for accountlistmode_.\Convert this journal's postings' amounts to the cost basis amounts if specified by options.0Convert report options and arguments to a query.PConvert report options to a query, ignoring any non-flag command line arguments.6Convert report options and arguments to query options.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.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.?//$"None9;T.A simple single-column balance report. It has: 2a list of items, one per account, each containing:the full account namethe Ledger-style elided short account name (the leaf account name, prefixed by any boring parents immediately above); or with --flat, the full account name againthe number of indentation steps for rendering a Ledger-style account tree, taking into account elided boring parents, --no-elide and --flat an amount the total of all amountsWhen true (the default), this makes balance --flat reports and their implementation clearer. Single/multi-col balance reports currently aren't all correct if this is false. Enabling this makes balance --flat --empty also show parent accounts without postings, in addition to those with postings and a zero balance. Disabling it shows only the latter. No longer supported, but leave this here for a bit. flatShowsPostinglessAccounts = TrueGenerate a simple balance report, containing the matched accounts and their balances (change of balance) during the specified period. This is like PeriodChangeReport with a single column (but more mature, eg this can do hierarchical display).In an account tree with zero-balance leaves removed, mark the elidable parent accounts (those with one subaccount and no balance of their own).Convert all the amounts in a single-column balance report to their value on the given date in their default valuation commodities.Find the market value of this amount on the given date, in it's default valuation commodity, based on recorded market prices. If no default valuation commodity can be found, the amount is left unchanged.Find the market value, if known, of one unit of this commodity (A) on the given valuation date, in the commodity (B) mentioned in the latest applicable market price. The latest applicable market price is the market price directive for commodity A with the latest date that is on or before the valuation date; or if there are multiple such prices with the same date, the last parsed.     #None!"09; A journal entries report is a list of whole transactions as originally entered in the journal (mostly). This is used by eg hledger's print command and hledger-web's journal entries view. *Select transactions for an entries report.                $None9;TLA multi balance report is a balance report with one or more columns. It has: *a list of each column's period (date span)%a list of row items, each containing:the full account namethe leaf account namethe account's depth"the amounts to show in each columnthe total of the row's amounts the average of the row's amounts 3the column totals and the overall total and averageThe meaning of the amounts depends on the type of multi balance report, of which there are three: periodic, cumulative and historical (see  and Hledger.Cli.Balance).Generates a single column BalanceReport like balanceReport, but uses multiBalanceReport, so supports --historical. Does not support boring parent eliding yet.Generate a multicolumn balance report for the matched accounts, showing the change of balance, accumulated balance, or historical balance in each of the specified periods.Convert all the amounts in a multi-column balance report to their value on the given date in their default valuation commodities (which are determined as of that date, not the report interval dates). %None!"09;L  A summary posting summarises the activity in one account within a report interval. It is currently kludgily represented by a regular Posting with no description, the interval's start date stored as the posting date, and the interval's end date attached with a tuple.A postings report is a list of postings with a running total, a label for the total field, and a little extra transaction info to help with rendering. This is used eg for the register command.Select postings from the journal and add running balance and other information to make a postings report. Used by eg hledger's register command.ZAdjust report start/end dates to more useful ones based on journal data and report intervals. Ie: 1. If the start date is unspecified, use the earliest date in the journal (if any) 2. If the end date is unspecified, use the latest date in the journal (if any) 3. If a report interval is specified, enlarge the dates to enclose whole intervalsFind postings matching a given query, within a given date span, and also any similarly-matched postings before that date span. Date restrictions and depth restrictions in the query are ignored. A helper for the postings report.sGenerate postings report line items from a list of postings or (with non-Nothing dates attached) summary postings.Generate one postings report line item, containing the posting, the current running balance, and optionally the posting date and/or the transaction description.nConvert a list of postings into summary postings, one per interval, aggregated to the specified depth if any.Given a date span (representing a report interval) and a list of postings within it, aggregate the postings into one summary posting per account.When a depth argument is present, postings to accounts of greater depth are also aggregated where possible. If the depth is 0, all postings in the span are aggregated into a single posting with account name "...".TThe showempty flag includes spans with no postings and also postings with 0 amount.&None!"09;FAn account transactions report represents transactions affecting a particular account (or possibly several accounts, but we don't use that). It is used eg by hledger-ui's and hledger-web's account register view, where we want to show one row per transaction, in the context of the current account. Report items consist of:the transaction, unmodifiedXthe transaction as seen in the context of the current account and query, which means:the transaction date is set to the "transaction context date", which can be different from the transaction's general date: if postings to the current account (and matched by the report query) have their own dates, it's the earliest of these dates.ethe transaction's postings are filtered, excluding any which are not matched by the report query9a text description of the other account(s) posted to/fromFa flag indicating whether there's more than one other account involved2the total increase/decrease to the current accountthe report transactions' running total after this transaction; or if historical balance is requested (-H), the historical running total. The historical running total includes transactions from before the report start date if one is specified, filtered by the report query. The historical running total may or may not be the account's historical running balance, depending on the report query.Items are sorted by transaction register date (the earliest date the transaction posts to the current account), most recent first. Reporting intervals are currently ignored.A transactions report includes a list of transactions (posting-filtered and unfiltered variants), a running balance, and some other information helpful for rendering a register view (a flag indicating multiple other accounts and a display string describing them) with or without a notion of current account(s). Two kinds of report use this data structure, see journalTransactionsReport and accountTransactionsReport below for detais.$Select transactions from the whole journal. This is similar to a "postingsReport" except with transaction-based report items which are ordered most recent first. XXX Or an EntriesReport - use that instead ? This is used by hledger-web's journal view.TGenerate transactions report items from a list of transactions, using the provided user-specified report query, a query specifying which account to use as the focus, a starting balance, a sign-setting function and a balance-summing function. Or with a None current account query, this can also be used for the journalTransactionsReport.&What is the transaction's date in the context of a particular account (specified with a query) and report query, as in an account register ? It's normally the transaction's general date, but if any posting(s) matched by the report query and affecting the matched account(s) have their own earlier dates, it's the earliest of these dates. Secondary transaction/posting dates are ignored.Generate a simplified summary of some postings' accounts. To reduce noise, if there are both real and virtual postings, show only the real ones.'Split a transactions report whose items may involve several commodities, into one or more single-commodity transactions reports. !"#$%&' !"#$%&' !"#$%'& !"#$%&''None!"09;(T      !"#$%&'((((None!"09;)lGet the historical running inclusive balance of a particular account, from earliest to latest posting date.)))))None*d  !"#$%&'()*+,-./0126789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghkijlmnopqrstuvwxyz{|}~`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz  !"#$%&'()*+,-./0123456789:;<=@ABCDEFGHIJKLMNOPQRSVWXYZ[\]^_`abdefghijklmnopqrstuvwxyz{|}~      !"#$%&'(***./0./1./2./3./4./5.67.68.69:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijkllmnopqrsttuvwxyz{{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~           _ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ! !!!!!!!!!!!!!!!!!!" "!"""#"$"%"&#'#(#)#*$+$,$,$-$.$/$0%1%2%3%4%5&6&7&8&9&:&;&<&=&>&?&@&A&B&C'D(E)F*G*H*I*J*K*L*M*N*O*P*Q*R*S+T+T+U+V+W+W+X+Y+Z+Z+[+\+]+^+_+`+a+b+b+c+d+e+f+g+h+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+x+y+z+{+|+}+~++++++++++++++++++.............               !"#$%&'()*+,-./0123456789:;<=0>?@ABCDEFGHIJKLMNOPQRSTUVWXYHZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~IIII         !!!!!!!!!!!!""""""#$$%%%%%%%%%&&&&&&hledger-lib-1.1-LVTxmwfsckICrjIyDufvyBHledger.Utils.UTF8IOCompatHledger.Utils.DebugHledger.Utils.TestHledger.Utils.RegexHledger.Utils.TreeHledger.Data.TypesHledger.Utils.ParseHledger.Utils.StringHledger.Utils.Text Hledger.UtilsHledger.Data.StringFormatHledger.Data.RawOptionsHledger.Data.PeriodHledger.Data.DatesHledger.Data.CommodityHledger.Data.AmountHledger.Data.AccountNameHledger.Data.PostingHledger.Data.TransactionHledger.Data.Timeclock Hledger.QueryHledger.Data.JournalHledger.Data.AccountHledger.Data.Ledger Hledger.DataHledger.Read.CommonHledger.Read.CsvReaderHledger.Read.LedgerReaderHledger.Read.TimeclockReaderHledger.Read.TimedotReaderHledger.Read.JournalReader Hledger.ReadHledger.Reports.ReportOptionsHledger.Reports.BalanceReportHledger.Reports.EntriesReport#Hledger.Reports.MultiBalanceReportsHledger.Reports.PostingsReport#Hledger.Reports.TransactionsReportsHledger.Reports$Hledger.Reports.BalanceHistoryReportHledgerPaths_hledger_libLedger.Parser.TextHledger.Cli.CliOptionsCliOptsbase System.IO appendFile writeFilereadFile getContentsputStrLnputStrGHC.IO.Handle.Text hPutStrLnhPutStr hGetContents)pretty-show-1.6.12-APoyzWUT80sLwzp0X0LDvDText.Show.PrettyppShow SystemStringfromSystemStringtoSystemStringerror' userError'testName flattenTests filterTestsis assertParseassertParseFailureassertParseEqualprintParseError ReplacementRegexp regexMatchesregexMatchesCIregexReplaceByregexReplaceByCI regexReplaceregexReplaceCIregexReplaceMemoregexReplaceCIMemoFastTreeTrootsubsbranchesleaves subtreeatsubtreeinforest treeprunetreemap treefiltertreeanyshowtree showforest emptyTree mergeTrees treeFromPath treeFromPaths$fShowFastTree $fEqFastTree $fOrdFastTreeLedgerljournal laccountsAccountaname aebalanceasubs anumpostings aibalanceaparentaboringReaderrFormat rExtensionsrParser rExperimental StorageFormat ParsedJournalJournaljparsedefaultyearjparsedefaultcommodityjparseparentaccounts jparsealiasesjparsetimeclockentries jaccounts jcommoditiesjinferredcommodities jmarketprices jmodifiertxns jperiodictxnsjtxnsjfinalcommentlinesjfiles jlastreadtime MarketPricempdate mpcommoditympamountTimeclockEntry tlsourcepostlcode tldatetime tlaccount tldescription TimeclockCode SetBalanceSetRequiredHoursInOutFinalOutPeriodicTransactionptperiodicexpr ptpostingsModifierTransaction mtvalueexpr mtpostings Transactiontindex tsourcepostdatetdate2tstatustcode tdescriptiontcommentttags tpostingstpreceding_comment_linesGenericSourcePosPostingpdatepdate2pstatuspaccountpamountpcommentptypeptagspbalanceassertion ptransaction ClearedStatus UnclearedPendingClearedTagTagValueTagName PostingTypeRegularPostingVirtualPostingBalancedVirtualPosting MixedAmountMixedAmount acommodity aquantityapriceastyle CommoditycsymbolcformatCommoditySymbolDigitGroupStyle DigitGroups AmountStyleascommoditysideascommodityspaced asprecisionasdecimalpoint asdigitgroupsPriceNoPrice UnitPrice TotalPriceQuantitySideLR AccountAlias BasicAlias RegexAlias AccountNameInterval NoIntervalDaysWeeksMonthsQuartersYears DayOfMonth DayOfWeekPeriod DayPeriod WeekPeriod MonthPeriod QuarterPeriod YearPeriod PeriodBetween PeriodFromPeriodTo PeriodAllWeekDayMonthDayYearDay MonthWeekYearWeekQuarterMonthYearDateSpan WhichDate PrimaryDate SecondaryDate SmartDate $fShowReader$fNFDataJournal$fNFDataClockTime$fNFDataMarketPrice$fNFDataTimeclockEntry$fNFDataTimeclockCode$fNFDataPeriodicTransaction$fNFDataModifierTransaction$fNFDataTransaction$fNFDataGenericSourcePos $fEqPosting$fNFDataPosting$fShowClearedStatus$fNFDataClearedStatus$fNFDataPostingType$fNFDataMixedAmount$fNFDataAmount$fNFDataCommodity$fNFDataDigitGroupStyle$fNFDataAmountStyle $fNFDataPrice$fToMarkupDecimalRaw $fNFDataSide$fNFDataAccountAlias$fNFDataInterval$fDefaultInterval$fDefaultPeriod$fNFDataDateSpan $fEqWhichDate$fShowWhichDate $fEqDateSpan $fOrdDateSpan$fDataDateSpan$fGenericDateSpan $fEqPeriod $fOrdPeriod $fShowPeriod $fDataPeriod$fGenericPeriod $fEqInterval$fShowInterval $fOrdInterval$fDataInterval$fGenericInterval$fEqAccountAlias$fReadAccountAlias$fShowAccountAlias$fOrdAccountAlias$fDataAccountAlias$fGenericAccountAlias$fEqSide $fShowSide $fReadSide $fOrdSide $fDataSide $fGenericSide$fEqDigitGroupStyle$fOrdDigitGroupStyle$fReadDigitGroupStyle$fShowDigitGroupStyle$fDataDigitGroupStyle$fGenericDigitGroupStyle$fEqAmountStyle$fOrdAmountStyle$fReadAmountStyle$fShowAmountStyle$fDataAmountStyle$fGenericAmountStyle$fShowCommodity $fEqCommodity$fDataCommodity$fGenericCommodity $fEqAmount $fOrdAmount $fDataAmount$fGenericAmount $fEqPrice $fOrdPrice $fDataPrice$fGenericPrice$fEqMixedAmount$fOrdMixedAmount$fDataMixedAmount$fGenericMixedAmount$fEqPostingType$fShowPostingType$fDataPostingType$fGenericPostingType$fEqClearedStatus$fOrdClearedStatus$fDataClearedStatus$fGenericClearedStatus$fEqGenericSourcePos$fReadGenericSourcePos$fShowGenericSourcePos$fOrdGenericSourcePos$fDataGenericSourcePos$fGenericGenericSourcePos$fEqTransaction$fDataTransaction$fGenericTransaction $fDataPosting$fGenericPosting$fEqModifierTransaction$fDataModifierTransaction$fGenericModifierTransaction$fEqPeriodicTransaction$fDataPeriodicTransaction$fGenericPeriodicTransaction$fEqTimeclockCode$fOrdTimeclockCode$fDataTimeclockCode$fGenericTimeclockCode$fEqTimeclockEntry$fOrdTimeclockEntry$fDataTimeclockEntry$fGenericTimeclockEntry$fEqMarketPrice$fOrdMarketPrice$fDataMarketPrice$fGenericMarketPrice $fEqJournal $fDataJournal$fGenericJournal $fDataAccount$fGenericAccount$fGenericClockTime$fDataClockTime$fDataDecimalRawErroringJournalParser JournalParserJournalStateParser TextParserchoice' choiceInState parsewithparsewithStringparseWithStateparseWithState' fromparse parseerrorshowParseErrorshowDateParseErrornonspacespacenonewline restoflineeolofpprint traceWithptrace debugLeveldbg0dbg1dbg2dbg3dbg4dbg5dbg6dbg7dbg8dbg9dbg0IOdbg1IOdbg2IOdbg3IOdbg4IOdbg5IOdbg6IOdbg7IOdbg8IOdbg9IO tracePrettyAttracePrettyAtIO dbgppshowdbgExitpdbgdbglog lowercase uppercasestriplstriprstripchomp stripbrackets elideLeft elideRight formatString underline quoteIfNeededsingleQuoteIfNeeded escapeQuoteswords'unwords' unbracketconcatTopPaddedconcatBottomPadded concatOneLinevConcatLeftAlignedvConcatRightAlignedpadtop padbottompadleftpadright cliptopleftfitto fitStringfitStringMulti padLeftWide padRightWide takeWidthstrWidth charWidth textstrip textlstrip textrstriptextElideRight quoteIfSpaced quotecharswhitespacecharsescapeDoubleQuotesescapeSingleQuotes stripquotesisSingleQuotedisDoubleQuoted textUnbrackettextConcatTopPadded difforzerofitTexttextPadLeftWidetextPadRightWide textTakeWidth textWidthfirst3second3third3first4second4third4fourth4first5second5third5fourth5fifth5first6second6third6fourth6fifth6sixth6splitAtElementgetCurrentLocalTimegetCurrentZonedTimeisLeftisRightapplyN expandPath firstJust readFile'readFileAnyLineEndingreadFileOrStdinAnyLineEndingmaximum'ReportItemField AccountFieldDefaultDateFieldDescriptionField TotalFieldDepthSpacerFieldFieldNoStringFormatComponent FormatLiteral FormatField StringFormatOneLine TopAligned BottomAlignedparseStringFormatdefaultStringFormatStyletests$fShowReportItemField$fEqReportItemField$fShowStringFormatComponent$fEqStringFormatComponent$fShowStringFormat$fEqStringFormatRawOptssetopt setboolopt inRawOptsbooloptmaybestringopt stringoptlistofstringopt maybeintoptintopt optserrorperiodAsDateSpandateSpanAsPeriodsimplifyPeriodisLastDayOfMonthisStandardPeriod showPeriod periodStart periodEnd periodNextperiodPrevious periodNextInperiodPreviousIn periodMoveTo periodGrow periodShrink mondayBeforeyearMonthContainingWeekStartingquarterContainingMonthfirstMonthOfQuarterstartOfFirstWeekInMonthshowDate showDateSpan getCurrentDaygetCurrentMonthgetCurrentYearelapsedSeconds spanStartspanEnd spansSpan splitSpan daysInSpanspanContainsDateperiodContainsDatespansIntersect spanIntersectspanDefaultsFrom spansUnion spanUnionparsePeriodExpr maybePeriodfixSmartDateStrfixSmartDateStrEitherfixSmartDateStrEither' fixSmartDateprevday parsedateM parsedate smartdate datesepchars datesepcharfailIfInvalidYearfailIfInvalidMonthfailIfInvalidDay mkdatespan nulldatespannulldate$fShowDateSpannonsimplecommoditycharsquoteCommoditySymbolIfNeeded commoditycommoditysymbolscommconversionRatetests_Hledger_Data_Commodity amountstyleamountnullamt missingamtnumhrsusdeurgbpat@@amountWithCommodity costOfAmount divideAmountisNegativeAmount isZeroAmountisReallyZeroAmountsetAmountPrecision withPrecisionshowAmountDebugshowAmountWithoutPrice showAmountshowAmountWithZeroCommodity maxprecisionmaxprecisionwithpointcanonicaliseAmount nullmixedamtmissingmixedamtmixednormaliseMixedAmount*normaliseMixedAmountSquashPricesForDisplayamountsfilterMixedAmountfilterMixedAmountByCommoditycostOfMixedAmountdivideMixedAmountaverageMixedAmountsisNegativeMixedAmountisZeroMixedAmountisReallyZeroMixedAmountisReallyZeroMixedAmountCostshowMixedAmount showMixedAmountWithZeroCommodityshowMixedAmountOneLine ltraceamountsetMixedAmountPrecisionshowMixedAmountWithPrecisionshowMixedAmountDebugshowMixedAmountWithoutPrice"showMixedAmountOneLineWithoutPricecanonicaliseMixedAmounttests_Hledger_Data_Amount$fNumMixedAmount$fShowMixedAmount $fNumAmount $fShowAmount$fShowMarketPrice acctsepcharacctsepaccountNameComponentsaccountNameFromComponentsaccountLeafNameaccountSummarisedNameaccountNameLevelaccountNameDropexpandAccountNamesexpandAccountNametopAccountNamesparentAccountNameparentAccountNamesisAccountNamePrefixOfisSubAccountNameOfsubAccountNamesFromaccountNameTreeFromnullaccountnametreeelideAccountNameclipAccountNameclipOrEllipsifyAccountNameaccountNameToAccountRegexaccountNameToAccountOnlyRegexaccountRegexToAccountNameisAccountRegextests_Hledger_Data_AccountName nullpostingpostingpost showPosting showCommentisReal isVirtualisBalancedVirtual hasAmount isAssignmentaccountNamesFromPostings sumPostings removePrices postingDate postingDate2 postingStatuspostingAllTagstransactionAllTagsrelatedPostingsisPostingInDateSpanisPostingInDateSpan'isEmptyPostingpostingsDateSpanpostingsDateSpan'accountNamePostingTypeaccountNameWithoutPostingTypeaccountNameWithPostingTypejoinAccountNamesconcatAccountNamesaccountNameApplyAliasesaccountNameApplyAliasesMemotests_Hledger_Data_Posting $fShowPosting nullsourceposnulltransactionshowTransactionshowTransactionUnelided%showTransactionUnelidedOneLineAmountsshowPostingLineshowAccountNamehasRealPostings realPostingsassignmentPostingsvirtualPostingsbalancedVirtualPostingstransactionsPostingstransactionPostingBalancesisTransactionBalancedbalanceTransactionbalanceTransactionUpdatetransactionDate2 txnTieKnot txnUntieKnottests_Hledger_Data_Transaction$fShowPeriodicTransaction$fShowModifierTransaction$fShowTransactiontimeclockEntriesToTransactionsentryFromTimeclockInOuttests_Hledger_Data_Timeclock$fReadTimeclockCode$fShowTimeclockCode$fShowTimeclockEntryQueryOptQueryOptInAcctOnlyQueryOptInAcctQueryAnyNoneNotOrAndCodeDescAcctDateDate2StatusRealAmtSymEmptyDepth parseQuerywords'' simplifyQuery filterQuery queryIsNull queryIsDepth queryIsDate queryIsDate2queryIsDateOrDate2 queryIsAcct queryIsSym queryIsReal queryIsStatus queryIsEmptyqueryIsStartDateOnlyqueryStartDate queryEndDate queryDateSpanqueryDateSpan' queryDepth inAccountinAccountQuerymatchesAccountmatchesMixedAmount matchesAmountmatchesPostingmatchesTransactiontests_Hledger_Query $fShowQuery$fShowQueryOpt $fEqQueryOpt$fDataQueryOpt $fShowOrdPlus $fEqOrdPlus $fDataOrdPlus $fEqQuery $fDataQuery nulljournaljournalFilePathjournalFilePathsaddTransactionaddModifierTransactionaddPeriodicTransactionaddMarketPricejournalTransactionAtjournalNextTransactionjournalPrevTransactionjournalDescriptionsjournalPostingsjournalAccountNamesUsedjournalAccountNames journalProfitAndLossAccountQueryjournalIncomeAccountQueryjournalExpenseAccountQueryjournalBalanceSheetAccountQueryjournalAssetAccountQueryjournalLiabilityAccountQueryjournalEquityAccountQueryjournalCashAccountQueryfilterJournalTransactionsfilterJournalPostingsfilterJournalAmountsfilterTransactionAmountsfilterPostingAmountfilterTransactionPostingsjournalApplyAliasesjournalFinalisejournalNumberAndTieTransactionsjournalUntieTransactionsjournalCheckBalanceAssertionsjournalBalanceTransactionsjournalApplyCommodityStylescommodityStylesFromAmountscanonicalStyleFromjournalConvertAmountsToCostjournalAmountsjournalDateSpan matchpats samplejournaltests_Hledger_Data_Journal$fMonoidJournal $fShowJournalnullacctaccountsFromPostingsnameTreeToAccounttieAccountParentsparentAccountsaccountsLevels mapAccounts anyAccounts sumAccounts clipAccountsclipAccountsAndAggregate pruneAccountsflattenAccountsfilterAccounts lookupAccount printAccounts showAccountsshowAccountsBoringFlagshowAccountDebugtests_Hledger_Data_Account $fEqAccount $fShowAccount nullledgerledgerFromJournalledgerAccountNames ledgerAccountledgerRootAccountledgerTopAccountsledgerLeafAccountsledgerAccountsMatchingledgerPostingsledgerDateSpanledgerCommoditiestests_ledgerFromJournaltests_Hledger_Data_Ledger $fShowLedgertests_Hledger_Data runTextParserrtprunJournalParserrjprunErroringJournalParserrejpgenericSourcePosparseAndFinaliseJournalparseAndFinaliseJournal'setYeargetYearsetDefaultCommodityAndStylegetDefaultCommodityAndStyle pushAccountpushParentAccountpopParentAccountgetParentAccountaddAccountAliasgetAccountAliasesclearAccountAliasesjournalAddFile parserErrorAtstatuspcodep descriptionpdatep datetimepsecondarydatepmodifiedaccountnamep accountnamepspaceandamountormissingpamountpamountp' mamountp'signpleftsymbolamountprightsymbolamountpnosymbolamountpcommoditysymbolpquotedcommoditysymbolpsimplecommoditysymbolp priceamountppartialbalanceassertionpfixedlotpricepnumberpmultilinecommentpemptyorcommentlinepfollowingcommentpfollowingcommentandtagspcommentp commentcharssemicoloncommentpcommentStartingWithp commentTagstagspnontagptagptagnamep tagvaluep postingdatespdatetagpbracketeddatetagsp CsvRecordreader rulesFileForparseRulesFiletransactionFromCsvRecordtests_Hledger_Read_CsvReader$fShowErrorComponent[]$fShowCsvRules $fEqCsvRulestests_Hledger_Read_LedgerReadertimeclockfilep"tests_Hledger_Read_TimeclockReader timedotfilep tests_Hledger_Read_TimedotReaderjournalp directivep accountaliaspdefaultyeardirectivepmarketpricedirectiveppostingp tests_Hledger_Read_JournalReaderPrefixedFilePathdefaultJournaldefaultJournalPathreadJournalFilesreadJournalFilesplitReaderPrefixrequireJournalFileExistsensureJournalFileExists readJournal' readJournaltests_Hledger_Read ReportOptsperiod_ interval_clearedstatus_cost_depth_display_date2_empty_ no_elide_real_format_query_average_related_ balancetype_accountlistmode_drop_ row_total_ no_total_value_AccountListMode ALDefaultALTreeALFlat BalanceType PeriodChangeCumulativeChangeHistoricalBalance FormatStr defreportoptsrawOptsToReportOptscheckReportOptstransactionDateFn postingDateFnwhichDateFromOptstree_flat_journalSelectingAmountFromOpts queryFromOptsqueryFromOptsOnlyqueryOptsFromOptsreportStartDate reportEndDatereportStartEndDates#tests_Hledger_Reports_ReportOptions $fDefaultBool$fDefaultReportOpts$fDefaultAccountListMode$fDefaultBalanceType$fEqBalanceType$fShowBalanceType$fDataBalanceType$fEqAccountListMode$fShowAccountListMode$fDataAccountListMode$fShowReportOpts$fDataReportOptsBalanceReportItem BalanceReportflatShowsExclusiveBalance balanceReportbalanceReportValuemixedAmountValue#tests_Hledger_Reports_BalanceReportEntriesReportItem EntriesReport entriesReport#tests_Hledger_Reports_EntriesReportMultiBalanceReportRowMultiBalanceReportsingleBalanceReportmultiBalanceReportmultiBalanceReportValue$fShowMultiBalanceReportPostingsReportItemPostingsReportpostingsReportmkpostingsReportItem$tests_Hledger_Reports_PostingsReportAccountTransactionsReportItemAccountTransactionsReportTransactionsReportItemTransactionsReporttriOrigTransactiontriDate triAmount triBalancetriCommodityAmounttriCommodityBalancejournalTransactionsReportaccountTransactionsReporttransactionRegisterDatetransactionsReportByCommoditytests_Hledger_ReportsaccountBalanceHistory tests_HledgercatchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName RawPeriodTxn rawPTxnPeriod rawPTxnPosts RawAutoTxn rawATxnQuery rawATxnPostsRawTransaction rawTxnDate rawTxnDateAux rawTxnState rawTxnCode rawTxnDesc rawTxnNote rawTxnPosts RawPostingRawPostingNote rawPostStaterawPostAccount rawPostAmount rawPostNoteRawEntityInSiturawEntityIndexrawEntityStartPos rawEntityrawEntityEndPos RawEntity Whitespace FileComment DirectiveRawTransactionEntityRawAutoTxnEntityRawPeriodTxnEntity EndOfFile directiveChar directiveName directiveArg RawJournal<$!> txnDateParserlongSep noteParser longSepOrEOLlongSepOrEOLIfuntiltokenP postingParser spaceCharsregularTxnParserautomatedTxnParserperiodicTxnParsertransactionParserdirectiveParser endOfLine endOfLineChar commentParserwhitespaceParser entityParser rendCaret journalParserparseJournalFile$fShowRawEntityInSitutoRegex replaceAllBy toRegexCIcompOptexecOpt replaceRegex replaceMatchreplaceBackReference Debug.Trace traceMarkerIO traceMarker traceEventIO traceEvent traceStack traceShowMtraceM traceShowId traceShowtraceIdtrace putTraceMsgtraceIO stringformatp componentpformatliteralp formatfieldpfieldp testFormat testParserformattingTests parserTestsspanFromSmartDate_parsetimewith smartdateonly periodexpr splitspanlatestearliestnextday startofdaythisweekprevweeknextweek startofweek thismonth prevmonth nextmonth startofmonth thisquarter prevquarter nextquarterstartofquarterthisyearprevyearnextyear startofyearnthdayofmonthcontainingnthdayofweekcontaining parsetime validYear validMonthvalidDayyyyymmddymdymydmdmonths monthabbrevs monthIndexmonIndexmonthmontoday yesterdaytomorrowlastthisnextthingintervalanddateperiodexprintervalperiodexprdateperiodexprreportingintervalperiodexprdatespandoubledatespan fromdatespan todatespan justdatespansimilarAmountsOpshowAmountWithPrecision!showAmountWithoutPriceOrCommodityshowamountquantitypunctuatenumber sumSimilarAmountsUsingFirstPricedigits showPriceshowPriceDebugshowAmountHelperapplyDigitGroupStyle chopdotzeronormaliseHelpertests_normaliseMixedAmount0tests_normaliseMixedAmountSquashPricesForDisplayshowMixedAmountHelper aliasReplaceinferBalancingAmountinferBalancingPricespriceInferrerForpostingSetTransactiontests_showTransactionUnelidedshowTransactionHelperrenderCommentLinespostingsAsLinespostingAsLinestests_postingAsLinesindent parenthesisebracketparseQueryTerm parseStatus parseBoolqueryDateSpansqueryDateSpans'earliestMaybeDatelatestMaybeDateearliestMaybeDate'latestMaybeDate'compareMaybeDates compareAmount matchedTagsOrdPlusLtLtEqGtGtEqEqAbsLtAbsLtEqAbsGtAbsGtEqAbsEqtests_parseQuery tests_words''prefixes defaultprefixtests_parseQueryTermparseAmountQueryTermtests_parseAmountQueryTermparseTag truestringstests_simplifyQuerysame filterQuery'tests_filterQuery queryIsDescqueryTermDateSpantests_matchesAccounttests_matchesPostingtests_matchesTransactionCurrentBalancesModifierEnvjournalNumberTransactionsjournalTieTransactionscheckBalanceAssertionjournalBalanceTransactionsSTdiscriminateByDatecheckInferAndRegisterAmountsaddAmountAndCheckBalance setBalance addToBalancestoreTransaction liftModifierjournalCommodityStylejournalInferCommodityStyles eBalanceseStoreTxeAssrteStylesmainfilejournalAccountNameTreetest_journalDateSpan negateprefix isnegativepatabspatCsvRulesparsereadJournalFromCsv validateCsvexpandIncludes validateRules showRecordgetEffectiveAssignment RegexpPattern DateFormat RecordMatcherConditionalBlock FieldTemplateJournalFieldName CsvFieldIndex CsvFieldName DirectiveNameCsvRulesParser rdirectivesrcsvfieldindexes rassignmentsrconditionalblocksparseCsv csvFileFordefaultRulesText defaultRulesrules addDirective addAssignment setIndexesAndAssignmentsFromListsetCsvFieldIndexesFromListaddAssignmentsFromListaddConditionalBlock getDirective parseCsvRulesrulespblankorcommentlinep blanklinep commentlinep commentcharp directives directivevalpfieldnamelistp fieldnamepquotedfieldnamepbarefieldnamepfieldassignmentpjournalfieldnamepjournalfieldnamesassignmentseparatorp fieldvalpconditionalblockprecordmatcherpmatchoperatorp patternspregexp getAmountStrnegateIfParenthesised negateStrrenderTemplate#parseDateWithFormatOrDefaultFormats test_parserrawEntityInSituToJournalUpdaterawPostingToPostingtimeclockentryp timedotdayp timedotentryptimedotnumberp timedotdotspaddTransactionstimedotdurationpaddJournalItemPorRethrowIOErrorcommoditydirectivepcommoditydirectiveonelinepcommoditydirectivemultilinepformatdirectivep transactionpincludedirectivepnewJournalWithParseStateFromaccountdirectivep indentedlinepapplyaccountdirectivependapplyaccountdirectivepaliasdirectivep basicaliasp regexaliaspendaliasesdirectivep tagdirectivependtagdirectivepdefaultcommoditydirectivepignoredpricecommoditydirectivepcommodityconversiondirectivepmodifiertransactionpperiodictransactionp postingspnewJournalContent findReader tryReaders journalEnvVarjournalEnvVar2journalDefaultFilenamereaders readerNamestests_readJournal' checkRawOptsintervalFromRawOptsclearedStatusFromRawOpts DisplayExpaccountlistmodeoptbalancetypeoptperiodFromRawOptsbeginDatesFromRawOptsendDatesFromRawOptsmaybedisplayopttests_queryFromOptstests_queryOptsFromOptsmarkBoringParentAccounts amountValuecommodityValuebalanceReportItemtests_balanceReportsamplejournal2tests_entriesReportClippedAccountNameMultiBalanceReportTotalsSummaryPostingadjustReportDatesmatchedPostingsBeforeAndDuringpostingsReportItemssummarisePostingsByIntervalsummarisePostingsInDateSpan totallabel!tests_summarisePostingsByIntervaltests_postingsReportaccountTransactionsReportItemssummarisePostingAccounts balancelabel#filterTransactionsReportByCommodity