@_      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./012345 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        !!!!!"#$$Safe (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.    None4pTrace (print on stdout at runtime) a showable value. (for easily tracing in the middle of a complex expression)5Labelled trace - like strace, with a label prepended.GMonadic trace - like strace, but works as a standalone line in a monad.8Custom trace - like strace, with a custom show function.iParsec trace - show the current parsec position and next input, and the provided label if it's non-null.Global 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. After command-line processing, it is also available as the debug_ field of %&. {- OPTIONS_GHC -fno-cse -} {- NOINLINE debugLevel -}uConvenience aliases for tracePrettyAt. Pretty-print a message and the showable value to the console, then return it.Pretty-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.,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 non-zero. Uses unsafePerformIO./Print 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.0Print 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.16Like dbg, then exit the program. Uses unsafePerformIO.2Print 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 ()! !"#$%&'()*+,-./012/ !"  !"#$%&'()*+,-./012" !"#$%&'()*+,-./012 ! !"#$%&'()*+,-./012Safe3 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).4Convert 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.5oConvert a unicode string to a system string, encoding with UTF-8 if we are on a posix platform with GHC < 7.2.6&A SystemString-aware version of error.7*A SystemString-aware version of userError.34567345673456734567Safe48gBacktracking choice, use this when alternatives share a prefix. Consumes no input if all choices fail. 89:;<=>?@AB 89:;<=>?@AB 89:;<=>?@AB 89:;<=>?@ABNoneNC>A replacement pattern. May include numeric backreferences (N).DaRegular 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.GWReplace all occurrences of the regexp, transforming each match with the given function.IReplace all occurrences of the regexp with the replacement pattern. The replacement pattern supports numeric backreferences (N) but no other RE syntax.KzA 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.CD#%&'EFGHIJKL()*$ CDEFGHIJKL DCEFIJKLGHCD#%&'EFGHIJKL()*$None M`An efficient-to-build tree suggested by Cale Gibbard, probably better than accountNameTreeFrom.R"List just the leaf nodes of a treeSeget the sub-tree rooted at the first (left-most, depth-first) occurrence of the specified node valueT^get the sub-tree for the specified node value in the first tree in forest in which it occurs.U%remove all nodes past a certain depthVapply f to all tree nodesW8remove all subtrees whose nodes do not fulfill predicateX'is predicate true in any node of tree ?Y-show a compact ascii representation of a treeZ/show a compact ascii representation of a forestMNOPQRSTUVWXYZ[\]^MNOPQRSTUVWXYZ[\]^OPQRSTUVWXYZMN[\]^MNOPQRSTUVWXYZ[\]^Nonea'Remove leading and trailing whitespace.bRemove leading whitespace.cRemove trailing whitespace.d*Remove trailing newlines/carriage returns.h7Clip 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).jWrap a string in double quotes, and -prefix any embedded single quotes, if it contains whitespace and is not already single- or double-quoted.ksDouble-quote this string if it contains whitespace, single quotes or double-quotes, escaping the quotes as needed.lsSingle-quote this string if it contains whitespace or double-quotes. No good for strings containing single quotes.ptQuote-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.qNQuote-aware version of unwords - single-quote strings which contain whitespacerKStrip one matching pair of single or double quotes on the ends of a string.vJoin several multi-line strings as side-by-side rectangular strings of the same height, top-padded. Treats wide characters as double width.wJoin several multi-line strings as side-by-side rectangular strings of the same height, bottom-padded. Treats wide characters as double width.xJoin multi-line strings horizontally, after compressing each of them to a single line with a comma and space between each original line.y7Join strings vertically, left-aligned and right-padded.z7Join 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.),_`abcdefghijkl,-mnopqrstuvwxyz{|.}~+(_`abcdefghijklmnopqrstuvwxyz{|}~(_`ieujklmnopqrstabcdfghvwxyz{|}~,_`abcdefghijkl,-mnopqrstuvwxyz{|.}~+None*+035-A Ledger has the journal it derives from, and the accounts derived from that. Accounts are accessible both list-wise and tree-wise, since each one knows its parent and subs; the first account is the root of the tree and always exists.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 subaccountsparent account5used in the accounts report to label elidable parentsA hledger journal reader is a triple of storage format name, a detector of that format, and a parser from that format to Journal.2The id of a data format understood by hledger, eg journal or csv>. The --output-format option selects one of these for output.ZA JournalUpdate is some transformation of a Journal. It can do I/O or raise an exception.+any trailing comments from the journal file/the context (parse state) at the end of parsingthe 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)(how to display amounts in each commodityA journal "context" is some data which can change in the course of parsing a journal. An example is the default year, which changes when a Y directive is encountered. At the end of parsing, the final context is saved for later use by eg the add command./the default year most recently specified with YEthe default commodity and amount style most recently specified with Dthe current stack of parent accounts/account name components specified with "account" directive(s). Concatenated, these are the account prefix prepended to parsed account names.2the current list of account name aliases in effect&the number of transactions read so farPthis 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 comment@optional: the expected balance 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. Different implementations can be selected via cabal flag for testing and benchmarking purposes.&A tag name and (possibly empty) value.      !"#$%&'()*+,-./01234     4   3  210/.-,+*)('&%$#"! <         !"#$%&'()*+,-./01234 None45An 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.6/A posting or balance report item's account name71A posting or register or entry report item's date88A posting or register or entry report item's description9`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 interpolate?QA 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-separatedAAvalues will be top-aligned (and bottom-padded to the same height)B.values will be bottom-aligned (and top-padded)C=Parse a string format specification, or return a parse error.56789:;<=>?@ABCD/012345E6756789:;<=>?@ABCDECD?@AB<=>56789:;E56789:;<=>?@ABCD/012345E67 None\JApply 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._[Read a file in universal newline mode, handling whatever newline convention it may contain.`ITotal version of maximum, for integral types, giving 0 for an empty list.FGHIJKLMNOPQRSTUVWXYZ[\]^_` !"  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~FGHIJKLMNOPQRSTUVWXYZ[\]^_` FGHIJKLMNOPQRSTUVWXYZ[\]^_`34567FGHIJKLMNOPQRSTUVWXYZ[\]^_` NoneeDTruncate all account name components but the last to two characters.h  "a:b:c","d:e" -> ["a","a:b","a:b:c","d","d:e"]i"a:b:c" -> ["a","a:b","a:b:c"]j  "a:b:c","d:e" -> ["a","d"]mUIs the first account a parent or other ancestor of (and not the same as) the second ?ocFrom a list of account names, select those which are direct subaccounts of the given account name.p*Convert a list of account names to a tree.rOElide 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! syKeep only the first n components of an account name, where n is a positive integer. If n is 0, returns the empty string.tnKeep only the first n components of an account name, where n is a positive integer. If n is 0, returns "...".uPConvert an account name to a regular expression matching it and its subaccounts.vTConvert an account name to a regular expression matching it but not its subaccounts.wMConvert an exact account-matching regular expression to a plain account name.xIDoes this string look like an exact account-matching regular expression ?abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy None~6Look up one of the sample commodities' symbol by name.FFind the conversion rate between two commodities. Currently returns 1.z{|}~z{|}~z{|}~z{|}~ None*1The empty simple amount.The empty simple amount.HA temporary value for parsed transactions which had no amount specified.8Apply 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.~Convert an amount to the specified commodity, ignoring and discarding any assigned prices and assuming an exchange rate of 1.IConvert 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 enforced*Divide an amount's quantity by a constant.9/Is this amount negative ? The price is ignored.:LDoes this amount appear to be zero when displayed with its given precision ?;Is this amount "really" zero, regardless of the display precision ? Since we are using floating point, for now just test to some high precision.<|Get the string representation of an amount, based on its commodity's display settings except using the specified precision."Set an amount's display precision.+Set an amount's display precision, flipped.xGet 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.The empty mixed amount.HA temporary value for parsed transactions which had no amount specified.EConvert amounts in various commodities into a normalised MixedAmount.,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 unchangedLike 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.@Sum same-commodity amounts. If there were different prices, set the price to a special marker indicating "various". Only used as a rendering helper. sumSimilarAmountsNotingPriceDifference :: [Amount] -> Amount sumSimilarAmountsNotingPriceDifference [] = nullamt sumSimilarAmountsNotingPriceDifference as = undefined'Get a mixed amount's component amounts.9Filter a mixed amount's component amounts by a predicate.Return 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.]Convert a mixed amount's component amounts to the commodity of their assigned price, if any.1Divide a mixed amount's quantities by a constant.,Calculate the average of some mixed amounts.NIs this mixed amount negative, if it can be normalised to a single commodity ?RDoes this mixed amount appear to be zero when displayed with its given precision ?<Is this mixed amount "really" zero ? See isReallyZeroAmount.ZIs this mixed amount "really" zero, after converting to cost commodities where possible ?Get 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.XLike showMixedAmount, but zero amounts are shown with their commodity if they have one.9Get the one-line string representation of a mixed amount.8Compact labelled trace of a mixed amount, for debugging.6Set the display precision in the amount's commodities.Get the string representation of a mixed amount, showing each of its component amounts with the specified precision, ignoring their commoditys' display precision settings.IGet an unambiguous string representation of a mixed amount for debugging.KGet the string representation of a mixed amount, but without any @ prices.TGet the one-line string representation of a mixed amount, but without any @ prices.TCanonicalise a mixed amount's display styles using the provided commodity style map.H89A:;<=BCD>?EFGHI@JKLMN11H89A:;<=BCD>?EFGHI@JKLMNNone4URender a datespan as a display string, abbreviating into a compact form if possible.O&Render a datespan as a display string.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.DCount the days in a DateSpan, or if it is open-ended return Nothing.&Does the span include the given date ?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.PShow 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 ssConvert a smart date string to an explicit yyyy/mm/dd string using the provided reference date, or raise an error."A safe version of fixSmartDateStr.JConvert a SmartDate to an absolute date using the provided reference date.5Parse a couple of date string formats to a time type.6Parse a date string to a time type, or raise an error.QVParse a time string to a time type using the provided pattern, or return the default.aParse 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.ROLike smartdate, but there must be nothing other than whitespace after the date.mMake a datespan from two valid date strings parseable by parsedate (or raise an error). Eg: mkdatespan "201111" "20111231".^OSTUPVWXYZ[\]^_`abcdefghijQRklmnopqrstuvwxyz{|}~$$^OSTUPVWXYZ[\]^_`abcdefghijQRklmnopqrstuvwxyz{|}~None Get 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*Derive 1. an account tree and 2. their balances from a list of postings. (ledger's core feature). The accounts are returned in a list, but retain their tree structure; the first one is the root of the tree..Convert an AccountName tree to an Account tree;Tie the knot so all subaccounts' parents are set correctly.DGet this account's parent accounts, from the nearest up to the root.4List the accounts at each level of the account tree.IMap a (non-tree-structure-modifying) function over this and sub accounts.AIs the predicate true on any of this account or its subaccounts ?5Add subaccount-inclusive balances to an account tree.-Remove all subaccounts below a certain depth.Remove 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).;Remove all leaf accounts and subtrees matching a predicate.Flatten 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!#Filter an account tree (to a list).Search an account list by name.   None TThe 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 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.Infer 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.#Set a posting's parent transaction. !"#$% !"#$%$!# "% !"#$%None&Convert 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 timelog 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+1,A query option changes a query 's/report'#s behaviour and output in some way.-1show an account register focussed on this account.as above but include sub-accounts in the account register | QueryOptCostBasis -- ^ show amounts converted to cost where possible | QueryOptDate2 -- ^ show secondary dates instead of primary dates/sA query is a composition of search criteria, which can be used to match postings, transactions, accounts and more.0 always match1 never match2negate this match3match if any of these match4match if all of these match5!match if code matches this regexp6(match if description matches this regexp70match postings whose account matches this regexp8'match if primary date in this date span9)match if secondary date in this date span:amatch txns/postings with this cleared status (Status Uncleared matches all states except cleared);Jmatch if "realness" (involves a real non-virtual account ?) has this value<3match 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 regexp>yif 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, existsAConvert 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 togetherBQuote-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.D~Remove query terms (or whole sub-expressions) not matching the given predicate from this query. XXX Semantics not yet clear.E"Does this query match everything ?LDoes 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.MWhat start date (or secondary date) does this query specify, if any ? For OR expressions, use the earliest of the dates. NOT is ignored.NWhat end date (or secondary date) does this query specify, if any ? For OR expressions, use the latest of the dates. NOT is ignored.OWhat 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.PWhat 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.Q@The depth limit this query specifies, or a large number if none.R~The account we are currently focussed on, if any, and whether subaccounts are included. Just looks at the first query option.SgA query for the account(s) we are currently focussed on, if any. Just looks at the first query option.TaDoes the match expression match this account ? A matching in: clause is also considered a match.V6Does 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 ?W.Does the match expression match this posting ?X2Does the match expression match this transaction ?XFilter a list of tags by matching against their names and optionally also their values.X,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY.,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY./0123456789:;<=>?@,-.ACDEJFGHILKMNOPQRSXWTUVBY; ,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYNone cWGet the transaction with this index (its 1-based position in the input stream), if any.dYGet the transaction that appeared immediately after this one in the input stream, if any.eZGet the transaction that appeared immediately before this one in the input stream, if any.f5Unique transaction descriptions used in this journal.g8All postings from this journal's transactions, in order.h/Unique account names posted to in this journal.iWUnique account names in this journal, including parent accounts containing no postings.j8A query for Profit & Loss accounts in this journal. Cf  Ghttp://en.wikipedia.org/wiki/Chart_of_accounts#Profit_.26_Loss_accounts.ksA query for Income (Revenue) accounts in this journal. This is currently hard-coded to the case-insensitive regex ^(income|revenue)s?(:|$).ljA query for Expense accounts in this journal. This is currently hard-coded to the case-insensitive regex ^expenses?(:|$).mDA query for Asset, Liability & Equity accounts in this journal. Cf  Ehttp://en.wikipedia.org/wiki/Chart_of_accounts#Balance_Sheet_Accounts.nhA query for Asset accounts in this journal. This is currently hard-coded to the case-insensitive regex  ^assets?(:|$).olA query for Liability accounts in this journal. This is currently hard-coded to the case-insensitive regex ^(debts?|liabilit(y|ies))(:|$).piA query for Equity accounts in this journal. This is currently hard-coded to the case-insensitive regex  ^equity(:|$).qA 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).r5Keep only transactions matching the query expression.sZKeep only postings matching the query expression. This can leave unbalanced transactions.tnWithin each posting's amount, keep only the parts matching the query. This can leave unbalanced transactions.u|Filter out all parts of this transaction's amounts which do not match the query. This can leave the transaction unbalanced.vKFilter out all parts of this posting's amount which do not match the query.wYApply additional account aliases (eg from the command-line) to all postings in a journal.xDo post-parse processing on a journal to make it ready for use: check all transactions balance, canonicalise amount formats, close any open timelog entries, maybe check balance assertions and so on.]Check any balance assertions in the journal and return an error message if any of them fail.yFill in any missing amounts and check that all journal transactions balance, or return an error message. This is done after parsing all amounts and working out the canonical commodities, since balancing depends on display precision. Reports only the first error encountered.z=Convert all the journal's posting amounts (and historical price amounts, but currently not transaction price amounts) to their canonical display settings. Ie, all amounts in a given commodity will use (a) the display settings of the first, and (b) the greatest precision, of the posting amounts in that commodity.{Given a list of amounts in parse order, build a map from commodities to canonical display styles for amounts in that commodity.UGet this journal's canonical amount style for the given commodity, or the null style.PClose any open timelog sessions in this journal using the provided current time.|LConvert all this journal's amounts to cost by applying their prices, if any.}rGet 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.6Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(a_`b^wyz|xrstuvih}~f\]cdegmjklnopq{[Z6Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None Filter 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 this ledger's journal but not the ledger's account tree.List a ledger's account names.$Get the named account from a ledger.Get 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. None     56789:;<=>?@ABCDEabcdefghijklmnopqrstuvwxyz{|}~     !"#$%&'(Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None4NRDoes the given file path and data look like it might be hledger's journal format ?Parse and post-process a Journal7 from hledger's journal file format, or give an error.Flatten a list of JournalUpdate's (journal-transforming monadic actions which can do IO or raise an exception) into a single equivalent action.Given a JournalUpdate-generating parsec parser, file path and data string, parse and post-process a Journal so that it's ready to use, or give an error.UTop-level journal parser. Returns a single composite, I/O performing, error-raising  JournalUpdate (and final JournalContextD) which can be applied to an empty journal to get the final result.*Parse a (possibly unbalanced) transaction.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).gParse 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.Q   Q   None WDoes the given file path and data look like it might be timeclock.el's timelog format ? Parse and post-process a Journall from timeclock.el's timelog format, saving the provided file path and the current time, or give an error.Parse a timelog entry.    None4N A set of data definitions and account-matching patterns sufficient to convert a particular CSV data file into meaningful journal transactions.=Does the given file path and data look like it might be CSV ?Parse and post-process a Journal` from CSV data, or give an error. XXX currently ignores the string and reads from the file pathzRead 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.}Ensure there is a conversion rules file at the given path, creating a default one if needed and returning True in this case.}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.G !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQB !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQNoneN @All the data formats we can read. formats = map rFormat readers#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).NRead the default journal file specified by the environment, or raise an error.YRead a journal from the given string, trying all known formats, or simply throw an error.JRead a journal from this string, trying whatever readers seem appropriate:.if a format is specified, try that reader onlyFor if one or more readers recognises the file path and data, try thoseotherwise, try them all.A CSV conversion rules file may also be specified for use by the CSV reader. Also there is a flag specifying whether to check or ignore balance assertions in the journal.R[Which readers are worth trying for this (possibly unspecified) format, filepath, and data ?SBFind the (first) reader which can handle the given format, if any.TRFind the readers which think they can handle the given file path and data, if any.IRead a Journal from this file (or stdin if the filename is -) or give an error message, using the specified data format or trying all known formats. A CSV conversion rules file may be specified for better conversion of that format. Also there is a flag specifying whether to check or ignore balance assertions in the journal.LIf the specified journal file does not exist, give a helpful error and quit.REnsure there is a journal file at the given path, creating an empty one if needed.U5Give the content for a new auto-created journal file.VWXYZRSTUVWXYZRSTUNone+Standard options for customising report filtering and output, corresponding to hledger's command-line options and query language arguments. Used in hledger-lib and above.aShould accounts be displayed: in the command's default style, hierarchically, or as a flat list ?>Which balance is being shown in a multi-column balance report.%The change of balance in each period.ZThe accumulated balance at each period's end, starting from zero at the report start date.iThe historical balance at each period's end, starting from the account balances at the report start date.BDo extra validation of opts, raising an error if there is trouble.;Legacy-compatible convenience aliases for accountlistmode_.AFigure out the date span we should report on, based on any beginendYperiod options provided. A period option will cause begin and end options to be ignored.Figure out the reporting interval, if any, specified by the options. --period overrides --daily overrides --weekly overrides --monthly etc.JGet a maybe boolean representing the last cleared/uncleared option if any.5Report which date we will report on based on --date2.6Select the Transaction date accessor based on --date2.2Select the Posting date accessor based on --date2.\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.B[\]^_`abcde77[\]^_`abcdeNone+35A 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.ffNone+35Fg 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.hsGenerate 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.inConvert a list of postings into summary postings, one per interval, aggregated to the specified depth if any.jGiven a date span (representing a reporting 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. gkhiljm gkhiljmNone+35An account transactions report represents transactions affecting a particular account (or possibly several accounts, but we don't use that). It is used by hledger-web's (and hledger-ui's) account register view, where we want to show one row per journal transaction, with:2the total increase/decrease to the current account0the names of the other account(s) posted to/fromtransaction dates, adjusted to the date of the earliest posting to the current account if those postings have their own datesZCurrently, reporting intervals are not supported, and report items are most recent first.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.nAdjust a transaction's date to the earliest date of postings to a particular account, if any, after filtering with a certain query.o!Generate transactions report items from a list of transactions, using the provided query and current account queries, starting balance, sign-setting function and balance-summing function. With a "this account" query of None, this can be used the for the journalTransactionsReport also.pGenerate 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.nqropst  nqropst None+35NmA renderable account name includes some additional hints for rendering accounts in a balance report. It has:The full account namelThe ledger-style short elided account name (the leaf name, prefixed by any boring parents immediately above)The number of indentation steps to use when rendering a ledger-style account tree (normally the 0-based depth of this account excluding boring parents, or 0 with --flat)..A simple single-column balance report. It has: Ta list of rows, each containing a renderable account name and a corresponding amountthe final total of the amounts When 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 periodBalanceReport with a single column (but more mature, eg this can do hierarchical display).uIn 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.vFind the market value of this amount on the given date, in it's default valuation commodity, based on historical prices. If no default valuation commodity can be found, the amount is left unchanged.wFind the market value, if known, of one unit of this commodity on the given date, in the commodity in which it has most recently been market-priced (ie the commodity mentioned in the most recent applicable historical price directive before this date).  ux  vwyz             ux  vwyz !None+35N#A row in a multi balance report has%An account name, with rendering hints>A list of amounts to be shown in each of the report's columns.The total of the row amounts.The average of the row amounts.LA multi balance report is a balance report with one or more columns. It has: !a list of each column's date span`a list of rows, each containing a renderable account name and the amounts to show in each column#a list of each column's final totalThe 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).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+35lGet the historical running inclusive balance of a particular account, from earliest to latest posting date.#None+35\     $None !"  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     !"#$%&'(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     ~'()'(*'(+'(,'(-'(.'/0'/1'/23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01233456789:;<=>?@ABCDEFGHIJKLMNOPQR S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] ^_`abcdefghijklmnopqrstuvwxyz{|}~        ! " # $ % &!'!(!(!)!*"+#,$-'./'.0'.1'.2'.3'.4'.5'.6'.7'.8'.9'.:'.;<=>?@ABCDEFG H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f ghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01234567'89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~|      !!!hledg_8149GtkuH2k1Sz3PQjK34cHledger.Utils.UTF8IOCompatHledger.Utils.DebugHledger.Utils.TestHledger.Utils.ParseHledger.Utils.RegexHledger.Utils.TreeHledger.Utils.StringHledger.Data.TypesHledger.Data.StringFormat Hledger.UtilsHledger.Data.AccountNameHledger.Data.CommodityHledger.Data.AmountHledger.Data.DatesHledger.Data.PostingHledger.Data.AccountHledger.Data.RawOptionsHledger.Data.TransactionHledger.Data.TimeLog Hledger.QueryHledger.Data.JournalHledger.Data.Ledger Hledger.DataHledger.Read.JournalReaderHledger.Read.TimelogReaderHledger.Read.CsvReader Hledger.ReadHledger.Reports.ReportOptionsHledger.Reports.EntriesReportHledger.Reports.PostingsReport#Hledger.Reports.TransactionsReportsHledger.Reports.BalanceReport#Hledger.Reports.MultiBalanceReports$Hledger.Reports.BalanceHistoryReportHledger.ReportsHledgerHledger.Cli.CliOptionsCliOptsbase System.IO appendFile writeFilereadFile getContentsputStrLnputStrGHC.IO.Handle.Text hPutStrLnhPutStr hGetContentsprett_2lC99QDHOE3JiCMPieJv3xText.Show.PrettyppShowtestName flattenTests filterTestsis assertParseassertParseFailureassertParseEqualprintParseErrorstraceltracemtrace traceWithptrace debugLeveldbgdbg1dbg2dbg3dbg4dbg5dbg6dbg7dbg8dbg9dbgIOdbg1IOdbg2IOdbg3IOdbg4IOdbg5IOdbg6IOdbg7IOdbg8IOdbg9IO tracePrettyAttracePrettyAtIOdbgtracedbgshow dbgppshowdbgExitpdbg SystemStringfromSystemStringtoSystemStringerror' userError'choice' parsewith parseWithCtx fromparse parseerrorshowParseErrorshowDateParseErrornonspacespacenonewline restoflineeolof ReplacementRegexp regexMatchesregexMatchesCIregexReplaceByregexReplaceByCI regexReplaceregexReplaceCIregexReplaceMemoregexReplaceCIMemoFastTreeTrootsubsbranchesleaves subtreeatsubtreeinforest treeprunetreemap treefiltertreeanyshowtree showforest emptyTree mergeTrees treeFromPath treeFromPaths lowercase uppercasestriplstriprstripchomp stripbrackets elideLeft elideRight formatString underline quoteIfSpaced quoteIfNeededsingleQuoteIfNeededescapeDoubleQuotesescapeSingleQuotes escapeQuoteswords'unwords' stripquotesisSingleQuotedisDoubleQuoted unbracketconcatTopPaddedconcatBottomPadded concatOneLinevConcatLeftAlignedvConcatRightAlignedpadtop padbottompadleftpadright cliptopleftfitto fitStringfitStringMulti padLeftWide padRightWide takeWidthstrWidthLedgerljournal laccountsAccountaname aebalanceasubs anumpostings aibalanceaparentaboringReaderrFormat rDetectorrParser StorageFormat JournalUpdateJournal jmodifiertxns jperiodictxnsjtxnsopen_timelog_entries jmarketpricesfinal_comment_linesjContextfiles filereadtimejcommoditystylesJournalContextCtxctxYearctxDefaultCommodityAndStyle ctxAccount ctxAliasesctxTransactionIndexYear MarketPricempdate mpcommoditympamount TimeLogEntry tlsourcepostlcode tldatetime tlaccount tldescription TimeLogCode SetBalanceSetRequiredHoursInOutFinalOutPeriodicTransactionptperiodicexpr ptpostingsModifierTransaction mtvalueexpr mtpostings Transactiontindex tsourcepostdatetdate2tstatustcode tdescriptiontcommentttags tpostingstpreceding_comment_linesGenericSourcePosPostingpdatepdate2pstatuspaccountpamountpcommentptypeptagspbalanceassertion ptransaction ClearedStatus UnclearedPendingClearedTag PostingTypeRegularPostingVirtualPostingBalancedVirtualPosting MixedAmountMixedAmount acommodity aquantityapriceastyleDigitGroupStyle DigitGroups AmountStyleascommoditysideascommodityspaced asprecisionasdecimalpoint asdigitgroupsPriceNoPrice UnitPrice TotalPriceQuantity CommoditySideLR AccountAlias BasicAlias RegexAlias AccountNameInterval NoIntervalDaysWeeksMonthsQuartersYears DayOfMonth DayOfWeekDateSpan WhichDate PrimaryDate SecondaryDate SmartDatenumberRepresentation $fShowReader$fNFDataJournal$fNFDataClockTime$fNFDataJournalContext$fNFDataMarketPrice$fNFDataTimeLogEntry$fNFDataTimeLogCode$fNFDataPeriodicTransaction$fNFDataModifierTransaction$fNFDataTransaction$fNFDataGenericSourcePos $fEqPosting$fNFDataPosting$fShowClearedStatus$fNFDataClearedStatus$fNFDataPostingType$fNFDataMixedAmount$fNFDataAmount$fNFDataDigitGroupStyle$fNFDataAmountStyle $fNFDataPrice$fToMarkupDecimalRaw $fNFDataSide$fNFDataAccountAlias$fNFDataInterval$fNFDataDateSpanReportItemField AccountFieldDefaultDateFieldDescriptionField TotalFieldDepthSpacerFieldFieldNoStringFormatComponent FormatLiteral FormatField StringFormatOneLine TopAligned BottomAlignedparseStringFormatdefaultStringFormatStyletestsfirst3second3third3first4second4third4fourth4first5second5third5fourth5fifth5first6second6third6fourth6fifth6sixth6splitAtElementgetCurrentLocalTimeisLeftisRightapplyN expandPath firstJust readFile'maximum' acctsepcharaccountNameComponentsaccountNameFromComponentsaccountLeafNameaccountSummarisedNameaccountNameLevelaccountNameDropexpandAccountNamesexpandAccountNametopAccountNamesparentAccountNameparentAccountNamesisAccountNamePrefixOfisSubAccountNameOfsubAccountNamesFromaccountNameTreeFromnullaccountnametreeelideAccountNameclipAccountNameclipOrEllipsifyAccountNameaccountNameToAccountRegexaccountNameToAccountOnlyRegexaccountRegexToAccountNameisAccountRegextests_Hledger_Data_AccountNamenonsimplecommoditycharsquoteCommoditySymbolIfNeeded commoditycommoditysymbolscommconversionRatetests_Hledger_Data_Commodity amountstyleamountnullamt missingamtnumhrsusdeurgbpat@@amountWithCommodity costOfAmount divideAmountsetAmountPrecision withPrecisionshowAmountDebugshowAmountWithoutPrice showAmountshowAmountWithZeroCommodity maxprecisionmaxprecisionwithpointcanonicaliseAmount nullmixedamtmissingmixedamtmixednormaliseMixedAmount*normaliseMixedAmountSquashPricesForDisplayamountsfilterMixedAmountfilterMixedAmountByCommoditycostOfMixedAmountdivideMixedAmountaverageMixedAmountsisNegativeMixedAmountisZeroMixedAmountisReallyZeroMixedAmountisReallyZeroMixedAmountCostshowMixedAmount showMixedAmountWithZeroCommodityshowMixedAmountOneLine ltraceamountsetMixedAmountPrecisionshowMixedAmountWithPrecisionshowMixedAmountDebugshowMixedAmountWithoutPrice"showMixedAmountOneLineWithoutPricecanonicaliseMixedAmounttests_Hledger_Data_AmountshowDate showDateSpan getCurrentDaygetCurrentMonthgetCurrentYearelapsedSeconds spanStartspanEnd spansSpan splitSpan daysInSpanspanContainsDatespansIntersect spanIntersectspanDefaultsFrom spansUnion spanUnionparsePeriodExpr maybePeriodfixSmartDateStrfixSmartDateStrEitherfixSmartDateStrEither' fixSmartDateprevday parsedateM parsedate smartdate datesepchars datesepcharfailIfInvalidYearfailIfInvalidMonthfailIfInvalidDay mkdatespan nulldatespannulldatetests_Hledger_Data_Dates nullpostingpostingpost showPosting showCommentisReal isVirtualisBalancedVirtual hasAmountaccountNamesFromPostings sumPostings postingDate postingDate2 postingStatuspostingAllTagstransactionAllTagsrelatedPostingsisPostingInDateSpanisPostingInDateSpan'isEmptyPostingpostingsDateSpanpostingsDateSpan'accountNamePostingTypeaccountNameWithoutPostingTypeaccountNameWithPostingTypejoinAccountNamesconcatAccountNamesaccountNameApplyAliasesaccountNameApplyAliasesMemotests_Hledger_Data_PostingnullacctaccountsFromPostingsnameTreeToAccounttieAccountParentsparentAccountsaccountsLevels mapAccounts anyAccounts sumAccounts clipAccountsclipAccountsAndAggregate pruneAccountsflattenAccountsfilterAccounts lookupAccount printAccounts showAccountsshowAccountsBoringFlagshowAccountDebugtests_Hledger_Data_Account $fEqAccount $fShowAccountRawOptssetopt setboolopt inRawOptsbooloptmaybestringopt stringoptlistofstringopt maybeintoptintopt optserror nullsourceposnulltransactionshowTransactionshowTransactionUnelided%showTransactionUnelidedOneLineAmountsshowAccountNamehasRealPostings realPostingsvirtualPostingsbalancedVirtualPostingstransactionsPostingstransactionPostingBalancesisTransactionBalancedbalanceTransactiontransactionDate2 txnTieKnottests_Hledger_Data_TransactiontimeLogEntriesToTransactionsentryFromTimeLogInOuttests_Hledger_Data_TimeLog$fReadTimeLogCode$fShowTimeLogCode$fShowTimeLogEntryQueryOptQueryOptInAcctOnlyQueryOptInAcctQueryAnyNoneNotOrAndCodeDescAcctDateDate2StatusRealAmtSymEmptyDepth parseQuerywords'' simplifyQuery filterQuery queryIsNull queryIsDepth queryIsDate queryIsDate2queryIsDateOrDate2 queryIsAcct queryIsSymqueryIsStartDateOnlyqueryStartDate queryEndDate queryDateSpanqueryDateSpan' queryDepth inAccountinAccountQuerymatchesAccountmatchesMixedAmount matchesAmountmatchesPostingmatchesTransactiontests_Hledger_Query nulljournalnullctxjournalFilePathjournalFilePathsaddTransactionaddModifierTransactionaddPeriodicTransactionaddMarketPriceaddTimeLogEntryjournalTransactionAtjournalNextTransactionjournalPrevTransactionjournalDescriptionsjournalPostingsjournalAccountNamesUsedjournalAccountNames journalProfitAndLossAccountQueryjournalIncomeAccountQueryjournalExpenseAccountQueryjournalBalanceSheetAccountQueryjournalAssetAccountQueryjournalLiabilityAccountQueryjournalEquityAccountQueryjournalCashAccountQueryfilterJournalTransactionsfilterJournalPostingsfilterJournalAmountsfilterTransactionAmountsfilterPostingAmountjournalApplyAliasesjournalFinalisejournalBalanceTransactionsjournalCanonicaliseAmountscanonicalStylesjournalConvertAmountsToCostjournalAmountsjournalDateSpan matchpats samplejournaltests_Hledger_Data_Journal nullledgerledgerFromJournalledgerAccountNames ledgerAccountledgerRootAccountledgerTopAccountsledgerLeafAccountsledgerAccountsMatchingledgerPostingsledgerDateSpanledgerCommoditiestests_ledgerFromJournaltests_Hledger_Data_Ledger $fShowLedgertests_Hledger_DatareadergenericSourcePosparseAndFinaliseJournalgetParentAccountjournalp directivep accountaliaspdefaultyeardirectivepmarketpricedirectivep datetimepstatuspcodeppostingpmodifiedaccountnamep accountnamepamountpamountp' mamountp'numberpemptyorcommentlinepfollowingcommentp tests_Hledger_Read_JournalReader tests_Hledger_Read_TimelogReader CsvRecord rulesFileForparseRulesFiletransactionFromCsvRecordtests_Hledger_Read_CsvReaderdefaultJournalPathdefaultJournal readJournal' readJournalreadJournalFilereadJournalFilesrequireJournalFileExistsensureJournalFileExiststests_Hledger_Read ReportOptsbegin_end_period_cleared_pending_ uncleared_cost_depth_display_date2_empty_ no_elide_real_daily_weekly_monthly_ quarterly_yearly_format_query_average_related_ balancetype_accountlistmode_drop_ row_total_ no_total_value_AccountListMode ALDefaultALTreeALFlat BalanceType PeriodBalanceCumulativeBalanceHistoricalBalance FormatStr defreportoptsrawOptsToReportOptscheckReportOptstree_flat_dateSpanFromOptsintervalFromOptsclearedValueFromOptswhichDateFromOptstransactionDateFn postingDateFnjournalSelectingAmountFromOpts queryFromOptsqueryFromOptsOnlyqueryOptsFromOpts#tests_Hledger_Reports_ReportOptionsEntriesReportItem EntriesReport entriesReport#tests_Hledger_Reports_EntriesReportPostingsReportItemPostingsReportpostingsReportmkpostingsReportItem$tests_Hledger_Reports_PostingsReportAccountTransactionsReportItemAccountTransactionsReportTransactionsReportItemTransactionsReporttriOrigTransactiontriDate triAmount triBalancetriCommodityAmounttriCommodityBalancejournalTransactionsReportaccountTransactionsReporttransactionsReportByCommodityRenderableAccountNameBalanceReportItem BalanceReportflatShowsExclusiveBalance balanceReportbalanceReportValuemixedAmountValue#tests_Hledger_Reports_BalanceReportMultiBalanceReportRowMultiBalanceReportmultiBalanceReportmultiBalanceReportValueaccountBalanceHistorytests_Hledger_Reports tests_Hledger Debug.Trace traceMarkerIO traceMarker traceEventIO traceEvent traceStack traceShowMtraceM traceShowId traceShowtraceIdtrace putTraceMsgtraceIOtoRegex replaceAllBy toRegexCIcompOptexecOpt replaceRegex replaceMatchreplaceBackReference charWidth quotecharswhitespacechars difforzero stringformatp componentpformatliteralp formatfieldpfieldp testFormat testParserformattingTests parserTestssimilarAmountsOpisNegativeAmount isZeroAmountisReallyZeroAmountshowAmountWithPrecision!showAmountWithoutPriceOrCommodityshowamountquantitypunctuatenumber sumSimilarAmountsUsingFirstPricedigits showPriceshowPriceDebugshowAmountHelperapplyDigitGroupStyle chopdotzeronormaliseHelpertests_normaliseMixedAmount0tests_normaliseMixedAmountSquashPricesForDisplayshowMixedAmountHelper$fNumMixedAmount$fShowMixedAmount $fNumAmount $fShowAmount showDateSpan'spanFromSmartDate parsetimewith smartdateonly splitspanlatestearliestnextday startofdaythisweekprevweeknextweek startofweek thismonth prevmonth nextmonth startofmonth thisquarter prevquarter nextquarterstartofquarterthisyearprevyearnextyear startofyearnthdayofmonthcontainingnthdayofweekcontaining parsetime validYear validMonthvalidDayyyyymmddymdymydmdmonths monthabbrevs monthIndexmonIndexmonthmontoday yesterdaytomorrowlastthisnextthing periodexprintervalanddateperiodexprintervalperiodexprdateperiodexprreportingintervalperiodexprdatespandoubledatespan fromdatespan todatespan justdatespan$fShowDateSpan aliasReplace $fShowPostinginferBalancingAmountinferBalancingPricespriceInferrerForsettxntests_showTransactionUnelidedshowTransactionHelperrenderCommentLinespostingsAsLinespostingAsLinestests_postingAsLinesindent$fShowPeriodicTransaction$fShowModifierTransaction$fShowTransactionparseQueryTerm parseStatus parseBoolqueryDateSpansqueryDateSpans'earliestMaybeDatelatestMaybeDateearliestMaybeDate'latestMaybeDate'compareMaybeDates compareAmount matchedTagsOrdPlusLtLtEqGtGtEqEqAbsLtAbsLtEqAbsGtAbsGtEqAbsEqtests_parseQuery tests_words''prefixes defaultprefixtests_parseQueryTermparseAmountQueryTermtests_parseAmountQueryTermparseTag truestringstests_simplifyQuerysame filterQuery'tests_filterQuery queryIsDescqueryTermDateSpantests_matchesAccounttests_matchesPostingtests_matchesTransaction $fShowQueryjournalCheckBalanceAssertionsjournalCommodityStylejournalCloseTimeLogEntriesmainfilejournalAccountNameTree checkBalanceAssertionsForAccountcheckBalanceAssertionsplitAssertionscanonicalStyleFromtest_journalDateSpan negateprefix isnegativepatabspat $fShowJournaldetectparsecombineJournalUpdates transactionpdatepspaceandamountormissingpformatsetYeargetYearsetDefaultCommodityAndStylegetDefaultCommodityAndStylepushParentAccountpopParentAccountaddAccountAliasgetAccountAliasesclearAccountAliasesgetIndexsetIndexincludedirectivepjournalAddFileaccountdirectivep enddirectivepaliasdirectivep basicaliasp regexaliaspendaliasesdirectivep tagdirectivependtagdirectivepdefaultcommoditydirectivepignoredpricecommoditydirectivepcommodityconversiondirectivepmodifiertransactionpperiodictransactionp descriptionpsecondarydatep postingspsignpleftsymbolamountprightsymbolamountpnosymbolamountpcommoditysymbolpquotedcommoditysymbolpsimplecommoditysymbolp priceamountppartialbalanceassertionpfixedlotpricepmultilinecommentpcommentp commentcharssemicoloncommentpcommentStartingWithp tagsInCommenttagsInCommentLinetagptagnamep tagvaluepledgerDateSyntaxToTagsdateValueFromTagsdate2ValueFromTags timelogentryp timelogfilepCsvRulesreadJournalFromCsv validateCsvensureRulesFileExistsexpandIncludes validateRules showRecordgetEffectiveAssignment RegexpPattern DateFormat RecordMatcherConditionalBlock FieldTemplateJournalFieldName CsvFieldIndex CsvFieldName DirectiveName rdirectivesrcsvfieldindexes rassignmentsrconditionalblocksparseCsv csvFileFornewRulesFileContentrules addDirective addAssignment setIndexesAndAssignmentsFromListsetCsvFieldIndexesFromListaddAssignmentsFromListaddConditionalBlock getDirective parseCsvRulesrulespblankorcommentlinep blanklinep commentlinep commentcharp directives directivevalpfieldnamelistp fieldnamepquotedfieldnamepbarefieldnamepfieldassignmentpjournalfieldnamepjournalfieldnamesassignmentseparatorp fieldvalpconditionalblockprecordmatcherpmatchoperatorp patternspregexp getAmountStrnegateIfParenthesised negateStrrenderTemplate#parseDateWithFormatOrDefaultFormats test_parser readersForreaderForStorageFormatreadersForPathAndDatanewJournalContent journalEnvVarjournalEnvVar2journalDefaultFilenamereaderstests_readJournal' DisplayExpaccountlistmodeoptbalancetypeoptmaybesmartdateoptmaybedisplayoptmaybeperiodopttests_queryFromOptstests_queryOptsFromOpts$fDefaultReportOpts$fDefaultAccountListMode$fDefaultBalanceTypetests_entriesReportSummaryPostingpostingsReportItemssummarisePostingsByIntervalsummarisePostingsInDateSpan totallabel!tests_summarisePostingsByIntervaltests_postingsReportsetTransactionDateToPostingDateaccountTransactionsReportItemssummarisePostingAccounts balancelabelfilterTransactionPostings#filterTransactionsReportByCommoditymarkBoringParentAccounts amountValuecommodityValuebalanceReportItemtests_balanceReportsamplejournal2ClippedAccountNameMultiBalanceTotalsRow$fShowMultiBalanceReport