a      !"#$%&'()*+,-./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 { | } ~                         portablealpha"John MacFarlane <jgm@berkeley.edu>    1 FA platform string is a string value from or for the operating system, F such as a file path or command-line argument (or environment variable's G name or value ?). On some platforms (such as unix) these are not real G unicode strings but have some encoding such as UTF-8. This alias does , no type enforcement but aids code clarity. \Join multi-line strings as side-by-side rectangular strings of the same height, top-padded. _Join multi-line strings as side-by-side rectangular strings of the same height, bottom-padded. .Compose strings vertically and right-aligned. XConvert a multi-line string to a rectangular string top-padded to the specified height. [Convert a multi-line string to a rectangular string bottom-padded to the specified height. XConvert a multi-line string to a rectangular string left-padded to the specified width. YConvert a multi-line string to a rectangular string right-padded to the specified width. NClip a multi-line string to the specified width and height from the top left. IClip and pad a multi-line string to fill the specified width and height. EConvert a possibly encoded platform string to a real unicode string. ; We decode the UTF-8 encoding recommended for unix systems  (cf http:www.dwheeler.comessays"fixing-unix-linux-filenames.html) $ and leave anything else unchanged. @Convert a unicode string to a possibly encoded platform string. . On unix we encode with the recommended UTF-8  (cf http:www.dwheeler.comessays"fixing-unix-linux-filenames.html) & and elsewhere we leave it unchanged. A version of error that' s better at displaying unicode. A version of userError that' s better at displaying unicode. #List just the leaf nodes of a tree Iget the sub-tree rooted at the first (left-most, depth-first) occurrence  of the specified node value Cget 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 !9remove all subtrees whose nodes do not fulfill predicate "(is predicate true in any node of tree ? #.show a compact ascii representation of a tree $0show a compact ascii representation of a forest %9trace (print on stdout at runtime) a showable expression < (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 (1trace an expression using a custom show function )*+,-./0 Get a Test's label, or the empty string. 1AFlatten a Test containing TestLists into a list of single tests. 2CFilter TestLists in a Test, recursively, preserving the structure. 3FSimple way to assert something is some expected value, with no label. 4JAssert a parse result is successful, printing the parse error on failure. 5SAssert a parse result is some expected value, printing the parse error on failure. 6789KApply a function the specified number of times. Possibly uses O(n) stack ?       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;< =>?@ABCD EFG !"#$%&'H()*+IJK,-./01234567891   !"#$%&'()*+,-./01234567891  !"#$%&'()*+,-./0123456789:JA generic, pure specification of how to filter transactions and postings. ;<"only include if in this date span =only include if cleared/ uncleared/don't care >only include if real/don't care ?%include if empty (ie amount is zero) @"convert all amounts to cost basis A0only include if matching these account patterns B4only include if matching these description patterns C)which dates to use (actual or effective) DEFGHpostings in this account I0sum of postings in this account and subaccounts JKLMNOFA hledger journal reader is a triple of format name, format-detecting % predicate, and a parser to Journal. PQRST@A JournalUpdate is some transformation of a Journal. It can do I/O or  raise an error. UVWXYZ[\,any trailing comments from the journal file ]0the context (parse state) at the end of parsing ^+the file path and raw text of the main and . any included journal files. The main file is - first followed by any included files in the  order encountered. _1when this journal was last read from its file(s) ` A journal context0 is some data which can change in the course of I parsing a journal. An example is the default year, which changes when a G Y directive is encountered. At the end of parsing, the final context / is saved for later use by eg the add command. ab0the default year most recently specified with Y c5the default commodity most recently specified with D d;the current stack of parent accounts specified by !account efghijklmnopqrstuvwxyz{|}~this transaction'!s postings (co-recursive types).  this posting'+s parent transaction (co-recursive types). 4 Tying this knot gets tedious, Maybe makes it easier/ optional. *the price for this amount at posting time  An amount's price may be written as @ unit price or @@ total price. < Note although Price has a MixedAmount, it should hold only , single-commodity amounts, cf costOfAmount.  the commodity' s symbol 3 display preferences for amounts of this commodity 2should the symbol appear on the left or the right 4should there be a space between symbol and quantity $number of decimal places to display 6 XXX these three might be better belonging to Journal "character to use as decimal point <character to use for separating digit groups (eg thousands) >positions of separators, counting leftward from decimal point :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~z{|}vwxyputsrqklmnofghije`abcdUVWXYZ[\]^_TOPQRSJKLMNEFGHI:;<=>?@ABCD: ;<=>?@ABCD;<=>?@ABCDEFGHIFGHIJKLMNKLMNOPQRSPQRSTU VWXYZ[\]^_VWXYZ[\]^_`abcdabcdefghijghijklmnolmnoputsrqqrstuvwxywxyz{|}{|}~ 5Get the current local date. Get the current local year. OSplit a DateSpan into one or more consecutive spans at the specified interval. ECount the days in a DateSpan, or if it is open-ended return Nothing. 'Does the span include the given date ? BCombine two datespans, filling any unspecified dates in the first  with dates from the second. DParse a period expression to an Interval and overall DateSpan using 7 the provided reference date, or return a parse error. EShow a DateSpan as a human-readable pseudo-period-expression string. EConvert a single smart date string to a date span using the provided $ reference date, or raise an error. /Convert a smart date string to an explicit yyyy/mm/dd string using 1 the provided reference date, or raise an error. #A safe version of fixSmartDateStr. KConvert a SmartDate to an absolute date using the provided reference date. ;Parse a couple of date-time string formats to a time type. 6Parse a couple of date string formats to a time type. <Parse a date-time string to a time type, or raise an error. 7Parse a date string to a time type, or raise an error. BParse a time string to a time type using the provided pattern, or  return the default. 4Parse a date in any of the formats allowed in ledger's period expressions, and maybe some others:   2004  2004/10  2004/10/1  10/1  21  october, oct  yesterday, today, tomorrow , this/next/last week/day/month/quarter/year NReturns a SmartDate, to be converted to a full date later (see fixSmartDate). :Assumes any text in the parse stream has been lowercased. PLike smartdate, but there must be nothing other than whitespace after the date. VLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl55ELook up one of the hard-coded default commodities. For use in tests. GFind the conversion rate between two commodities. Currently returns 1. AConvert a list of commodities to a map from commodity symbols to 7 unique, display-preference-canonicalised commodities. mnopqrstuvwxy+zDApply a binary arithmetic operator to two amounts, after converting G the first to the commodity (and display precision) of the second in a F simplistic way. This should be used only for two amounts in the same : commodity, since the conversion rate is assumed to be 1. E NB preserving the second commodity is preferred since sum and other 0 folds start with the no-commodity zero amount. {NConvert an amount to the specified commodity, assuming an exchange rate of 1. SConvert a mixed amount to the specified commodity, assuming an exchange rate of 1. GConvert an amount to the commodity of its saved price, if any. Notes: k - price amounts must be MixedAmounts with exactly one component Amount (or there will be a runtime error) K - price amounts should be positive, though this is not currently enforced |BGet the string representation of an amount, based on its commodity's 8 display settings except using the specified precision. GGet the unambiguous string representation of an amount, for debugging. }8Get the string representation of an amount, without any @ price. ~SGet the string representation of an amount, without any price or commodity symbol. BGet the string representation of an amount, based on its commodity's X display settings. Amounts which look like zero are rendered without sign or commodity. BGet the string representation of the number part of of an amount, 0 using the display settings from its commodity. =A special precision value meaning show all available digits. ,Similar, forces display of a decimal point. Replace a number string'.s decimal point with the specified character, / and add the specified digit group separators. ;Add thousands-separating commas to a decimal number string MDoes this amount appear to be zero when displayed with its given precision ? Is this amount really- zero, regardless of the display precision ? N Since we are using floating point, for now just test to some high precision. 0Is this amount negative ? The price is ignored. Access a mixed amount's components. SDoes this mixed amount appear to be zero when displayed with its given precision ? Is this mixed amount really zero ? See isReallyZeroAmount. OIs this mixed amount negative, if it can be normalised to a single commodity ? Is this mixed amount really zero, after converting to cost  commodities where possible ? AGet the string representation of a mixed amount, showing each of D its component amounts. NB a mixed amount can have an empty amounts  list in which case it shows as "". EGet the string representation of a mixed amount, showing each of its @ component amounts with the specified precision, ignoring their  commoditys'; display precision settings. NB a mixed amount can have an . empty amounts list in which case it shows as "". JGet an unambiguous string representation of a mixed amount for debugging. =Get the string representation of a mixed amount, but without  any @ prices. ;Get the string representation of a mixed amount, and if it : appears to be all zero just show a bare 0, ledger-style. >Get the string representation of a mixed amount, or a bare 0,  without any @ prices. USimplify a mixed amount by removing redundancy in its component amounts, as follows: E 1. sum amounts which have the same commodity (ignoring their price)  2. remove zero amounts = 3. if there are no amounts at all, add a single zero amount Set a mixed amount'0s commodity to the canonicalised commodity from  the provided commodity map.  Set an amount'0s commodity to the canonicalised commodity from  the provided commodity map. FSimplify a mixed amount by combining any component amounts which have G the same commodity, ignoring and discarding their unit prices if any. I Also removes zero amounts, or adds a single zero amount if there are no  amounts at all.   Convert a mixed amount'.s component amounts to the commodity of their  saved price, if any.  Divide a mixed amount's quantities by some constant.  Divide an amount's quantity by some constant.  The empty simple amount. The empty mixed amount. IA temporary value for parsed transactions which had no amount specified.                 a:b:c,d:e -> [a,a:b,a:b:c,d,d:e]  a:b:c,d:e -> [a,d] <From 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.  !"#$%&5Elide an account name to fit in the specified width.  From the ledger 2.6 news:  H What Ledger now does is that if an account name is too long, it will F start abbreviating the first parts of the account name down to two E 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 ; Expenses was abbreviated to fit  Ex:We:Afternoon:Cash ; Expenses and  Wednesday abbreviated E ; Expenses:Wednesday:Afternoon:Lunch:Snack:Candy:Chocolate:Cash 7 ..:Af:Lu:Sn:Ca:Ch:Cash ; Abbreviated and elided! ' !"#$%&' !"#$%&' !"#$%&' ()*+,-./01AIs this posting cleared? If this posting was individually marked 8 as cleared, returns True. Otherwise, return the parent  transaction'+s cleared status or, if there is no parent  transaction, return False. 24Does this posting fall within the given date span ? 34>Get the minimal date span which contains all the postings, or - DateSpan Nothing Nothing if there are none. ()*+,-./01234 ()*+,-./01234 ()*+,-./01234 56GShow a journal transaction, formatted for the print command. ledger 2.x's !standard format looks like this:  yyyymmdd[ *][ CODE]: description......... [ ; comment...............] O account name 1..................... ...$amount1[ ; comment...............] O account name 2..................... ..$-amount1[ ; comment...............]  Dpcodewidth = no limit -- 10 -- mimicking ledger layout. 0pdescwidth = no limit -- 20 -- I don't remember what these mean, Lpacctwidth = 35 minimum, no maximum -- they were important at the time. pamtwidth = 11 pcommentwidth = no limit -- 22 789:=Show an account name, clipped to the given width if any, and  appropriately bracketed/*parenthesised for the given posting type. ;<=>Get the sums of a transaction'0s real, virtual, and balanced virtual postings. ?5Is this transaction balanced ? A balanced transaction's real D (non-virtual) postings sum to 0, and any balanced virtual postings  also sum to 0. @BEnsure this transaction is balanced, possibly inferring a missing A amount or a conversion price first, or return an error message. 1Balancing is affected by the provided commodities' display precisions. AWe can infer an amount when there are multiple real postings and B exactly one of them is amountless; likewise for balanced virtual G postings. Inferred amounts are converted to cost basis when possible. DWe can infer a price when all amounts were specified and the sum of  real postings'9 amounts is exactly two non-explicitly-priced amounts in @ different commodities; likewise for balanced virtual postings. ABAConvert the primary date to either the actual or effective date. CEnsure a transaction's postings refer back to it. D Set a posting's parent transaction. 56789:;<=>?@ABCD56789:;<=>?@ABCD56789:;<=>?@ABCD ECConvert time log entries to journal transactions. When there is no E clockout, add one with the provided current time. Sessions crossing ? midnight are split into days to give accurate per-day totals. FFConvert a timelog clockin and clockout entry to an equivalent journal S transaction, representing the time expenditure. Note this entry is not balanced,  since we omit the " assets:time"! transaction for simpler output. EFEFEF -GHIJKLMNOPQRSTU=Keep only transactions we are interested in, as described by ? the filter specification. May also massage the data a little. V9Keep only postings we are interested in, as described by ? the filter specification. May also massage the data a little. ) This can leave unbalanced transactions. WKKeep only transactions whose description matches the description patterns. X?Keep only transactions which fall between begin and end dates. O We include transactions on the begin date and exclude transactions on the end @ date, like ledger. An empty date string means no restriction. Y7Keep only transactions which have the requested cleared/ uncleared  status, if there is one. Z3Keep only postings which have the requested cleared/uncleared status,  if there is one. [BStrip out any virtual postings, if the flag is true, otherwise do  no filtering. \BStrip out any postings with zero amount, unless the flag is true. ]NKeep only transactions which affect accounts deeper than the specified depth. ^CStrip out any postings to accounts deeper than the specified depth < (and any transactions which have no postings as a result). _NKeep only transactions which affect accounts matched by the account patterns. E More precisely: each positive account pattern excludes transactions H which do not contain a posting to a matched account, and each negative I account pattern excludes transactions containing a posting to a matched  account. `JKeep only postings which affect accounts matched by the account patterns. ) This can leave transactions unbalanced. aConvert this journal's transactions' primary date to either the  actual or effective date. bADo post-parse processing on a journal, to make it ready for use. cDFill in any missing amounts and check that all journal transactions E balance, or return an error message. This is done after parsing all D amounts and working out the canonical commodities, since balancing I depends on display precision. Reports only the first error encountered. dConvert all the journal'%s amounts to their canonical display B settings. Ie, all amounts in a given commodity will use (a) the G display settings of the first, and (b) the greatest precision, of the J amounts in that commodity. Prices are canonicalised as well, so consider 3 calling journalApplyHistoricalPrices before this. eApply this journal'?s historical price records to unpriced amounts where possible. fVGet the price for a commodity on the specified day from the price database, if known. F Does only one lookup step, ie will not look up the price of a price. gQClose any open timelog sessions in this journal using the provided current time. hConvert all this journal'4s amounts to cost by applying their prices, if any. iGet this journal'Cs unique, display-preference-canonicalised commodities, by symbol. jGet all this journal' s amounts'# commodities, in the order parsed. kGet all this journal'5s amount and price commodities, in the order parsed. lGet this amount'9s commodity and any commodities referenced in its price. mGet all this journal' s amounts, in the order parsed. n7The (fully specified) date span containing this journal's transactions, 0 or DateSpan Nothing Nothing if there are none. o!Check if a set of hledger account/(description filter patterns matches the I given account name or entry description. Patterns are case-insensitive E regular expressions. Prefixed with not:, they become anti-patterns. pBCalculate the account tree and all account balances from a journal's 7 postings, returning the results for efficient lookup. qFGiven a list of postings, return an account name tree and three query A functions that fetch postings, subaccount-excluding-balance and / subaccount-including-balance by account name. rEAdd subaccount-excluding and subaccount-including balances to a tree G of account names somewhat efficiently, given a function that looks up  transactions by account name. s>Convert a list of postings to a map from account name to that  account' s postings. 2GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs-GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs-GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs tuKGiven 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. vwxyz{|}UConvert a possibly relative, possibly tilde-containing file path to an absolute one. X using the current directory from a parsec source position. ~username is not supported. ~ tuvwxyz{|}~ tuvwxyz{|}~ tuvwxyz{|}~ Filter a journal'3s transactions as specified, and then process them D to derive a ledger containing all balances, the chart of accounts,  canonicalised commodities etc.  List a ledger's account names. %Get the named account from a ledger.  List a ledger's accounts, in tree order  List a ledger'$s top-level accounts, in tree order BAccounts in ledger whose name matches the pattern, in tree order. List a ledger account's immediate subaccounts  List a ledger'!s postings, in the order parsed.  Get a ledger'+s tree of accounts to the specified depth.  Get a ledger'4s tree of accounts rooted at the specified account. 9The (fully specified) date span containing all the ledger's (filtered) transactions, 0 or DateSpan Nothing Nothing if there are none. Convenience aliases. c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;< =>?@ABCD EFG !"#$%&'H()*+IJK,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs.1Does the given file path and data provide hledger's journal file format ? Parse and post-process a Journal from hledger's journal file  format, or give an error. 7Top-level journal parser. Returns a single composite, I/O performing,  error-raising  JournalUpdate (and final JournalContext) which can be 6 applied to an empty journal to get the final result. 2Parse a (possibly unbalanced) ledger transaction. CParse an account name. Account names may have single spaces inside I them, and are terminated by two or more spaces. They should have one or E more components of at least one character, separated by the account  separator char. DParse an amount, with an optional left or right currency symbol and  optional price. EParse a numeric quantity for its value and display attributes. Some " international number formats (cf  http:en.wikipedia.orgwiki(Decimal_separator) are accepted: either E period or comma may be used for the decimal point, and the other of I these may be used for separating digit groups in the integer part (eg a F thousands separator). This returns the numeric value, the precision I (number of digits to the right of the decimal point), the decimal point H and separator characters (defaulting to . and ,), and the positions of C separators (counting leftward from the decimal point, the last is  assumed to repeat).   6Does the given file path and data provide timeclock.el's timelog format ? Parse and post-process a Journal from timeclock.el' s timelog H format, saving the provided file path and the current time, or give an  error. Parse a timelog entry.  DRead a Journal from this string (and file path), auto-detecting the G data format, or give a useful error string. Tries to parse each known H data format in turn. If none succeed, gives the error message specific I to the intended data format, which if not specified is guessed from the $ file suffix and possibly the data. BRead a journal from this file, using the specified data format or I trying all known formats, or give an error string; also create the file  if it doesn' t exist. SEnsure there is a journal at the given file path, creating an empty one if needed. 6Give the content for a new auto-created journal file. DRead a Journal from this string, using the specified data format or 4 trying all known formats, or give an error string.  Get the user'8s journal file path. Like ledger, we look first for the G LEDGER_FILE environment variable, and if that does not exist, for the H legacy LEDGER environment variable. If neither is set, or the value is 7 blank, return the default journal file path, which is  .hledger.journal in the users'"s home directory, or if we cannot + determine that, in the current directory.  Get the user's default timelog file path.  Read the user'*s default journal file, or give an error.  Read the user'*s default timelog file, or give an error.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNOPQRSTUVWWXYZ[[\]^__`abcddefghijklmnopqrsttuvwxxyz{|}~      !"#$%&'()*+,-./0123456789 : ; < = > ? @ 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:;<=>?@ABCDEFGHIJKLMNOPQRSTSUSVSWSXSYSZS[S\S]S^S_S`SaSbScSdSeSfSgShSiSjSkSlSmSnSoSpSqSrSsStSuSvSwSxSySz{|{}{~{{{{{{{{{{{{{{      !"#$%&'()*+,,-.-/-0-1-2-3-4-5-6-7-8-89:;<;=>?>@>A>A>BCDCECFCGCHCICJCKCLMNOPOQOROSOTUVUWUXUYUZU[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        hledger-lib-0.14Hledger.Data.UTF8Hledger.Data.UtilsHledger.Data.TypesHledger.Data.DatesHledger.Data.CommodityHledger.Data.AmountHledger.Data.AccountNameHledger.Data.PostingHledger.Data.TransactionHledger.Data.TimeLogHledger.Data.JournalHledger.Read.UtilsHledger.Data.Ledger Hledger.DataHledger.Read.JournalReaderHledger.Read.TimelogReader Hledger.ReadHledger.Data.AccountreadFile writeFile appendFile getContents hGetContentsputStrputStrLnhPutStr hPutStrLnPlatformString underline unbracketconcatTopPaddedconcatBottomPaddedvConcatRightAlignedpadtop padbottompadleftpadright cliptopleftfittofromPlatformStringtoPlatformStringerror' userError' difforzero containsRegexsplitAtElementleaves subtreeatsubtreeinforest treeprunetreemap treefiltertreeanyshowtree showforeststraceltracemtracechoice' parsewith parseWithCtx fromparsenonspacespacenonewline restoflinegetCurrentLocalTimetnametflattentfilteris assertParseassertParseEqualprintParseErrorisLeftisRightapplyN FilterSpecdatespanclearedrealempty costbasisacctpatsdescpats whichdatedepthAccountaname apostingsabalanceLedgerjournalaccountnametree accountmapReaderrFormat rDetectorrParser JournalUpdateJournal jmodifiertxns jperiodictxnsjtxnsopen_timelog_entrieshistorical_pricesfinal_comment_linesjContextfiles filereadtimeJournalContextCtxctxYear ctxCommodity ctxAccountYearHistoricalPricehdatehsymbolhamount TimeLogEntrytlcode tldatetime tlcomment TimeLogCodeFinalOutOutInSetRequiredHours SetBalancePeriodicTransactionptperiodicexpr ptpostingsModifierTransaction mtvalueexpr mtpostings Transactiontdateteffectivedatetstatustcode tdescriptiontcomment tmetadata tpostingstpreceding_comment_linesPostingpstatuspaccountpamountpcommentptype pmetadata ptransaction PostingTypeBalancedVirtualPostingVirtualPostingRegularPosting MixedAmountMixedAmount commodityquantitypricePrice TotalPrice UnitPrice Commoditysymbolsidespaced precision decimalpoint separatorseparatorpositionsSideRL AccountNameInterval DayOfWeek DayOfMonthYearsQuartersMonthsWeeksDays NoIntervalDateSpan WhichDate EffectiveDate ActualDate SmartDateshowDate getCurrentDaygetCurrentYearelapsedSeconds splitSpan splitspan daysInSpanspanContainsDateparsePeriodExprdateSpanAsTextspanFromSmartDateStringspanFromSmartDateshowDayfixSmartDateStrfixSmartDateStrEither fixSmartDateprevdayparsedatetimeM parsedateM parsedatetime parsedate parsetimewith smartdate smartdateonly validYear validMonthvalidDayfailIfInvalidYearfailIfInvalidMonthfailIfInvalidDayyyyymmddymdymydmdmonthmontoday yesterdaytomorrowlastthisnextthing periodexprintervalanddateperiodexprintervalperiodexprdateperiodexprreportingintervalperiodexprdatespandoubledatespan fromdatespan todatespan justdatespan mkdatespancommconversionRatecanonicaliseCommodities$convertMixedAmountToSimilarCommodity costOfAmountsetAmountPrecisionshowAmountDebug maxprecisionmaxprecisionwithpointpunctuatethousandsamountsisZeroMixedAmountisNegativeMixedAmountisReallyZeroMixedAmountCostshowMixedAmountsetMixedAmountPrecisionshowMixedAmountWithPrecisionshowMixedAmountDebugshowMixedAmountWithoutPriceshowMixedAmountOrZero!showMixedAmountOrZeroWithoutPricenormaliseMixedAmountcanonicaliseMixedAmountcanonicaliseAmount)sumMixedAmountsPreservingHighestPrecisioncostOfMixedAmountdivideMixedAmount divideAmountnullamt nullmixedamt missingamttests_Hledger_Data_AmountTree'TaccountNameComponentsaccountNameFromComponentsaccountLeafNameaccountNameLevelaccountNameDropexpandAccountNamestopAccountNamesparentAccountNameparentAccountNamesisAccountNamePrefixOfisSubAccountNameOfsubAccountNamesFromaccountNameTreeFrom mergeTreespathtree fromPaths converttreeexpandTreeNamesaccountNameTreeFrom4elideAccountNameclipAccountName showPostingshowPostingForRegisterisReal isVirtualisBalancedVirtual hasAmountaccountNamesFromPostings sumPostings postingDatepostingClearedisPostingInDateSpanisEmptyPostingpostingsDateSpannulltransactionshowTransactionshowTransactionUnelidedshowTransactionForPrintshowTransaction'showAccountName realPostingsvirtualPostingsbalancedVirtualPostingstransactionPostingBalancesisTransactionBalancedbalanceTransactionnonzerobalanceerrorjournalTransactionWithDate txnTieKnotsettxntimeLogEntriesToTransactionsentryFromTimeLogInOut nulljournalnullctxjournalFilePathjournalFilePathsmainfileaddTransactionaddModifierTransactionaddPeriodicTransactionaddHistoricalPriceaddTimeLogEntryjournalPostingsjournalAccountNamesUsedjournalAccountNamesjournalAccountNameTreefilterJournalTransactionsfilterJournalPostings&filterJournalTransactionsByDescriptionfilterJournalTransactionsByDate(filterJournalTransactionsByClearedStatus$filterJournalPostingsByClearedStatusfilterJournalPostingsByRealnessfilterJournalPostingsByEmpty filterJournalTransactionsByDepthfilterJournalPostingsByDepth"filterJournalTransactionsByAccountfilterJournalPostingsByAccountjournalSelectingDatejournalFinalisejournalBalanceTransactionsjournalCanonicaliseAmountsjournalApplyHistoricalPricesjournalHistoricalPriceForjournalCloseTimeLogEntriesjournalConvertAmountsToCostjournalCanonicalCommoditiesjournalAmountCommodities journalAmountAndPriceCommoditiesamountCommoditiesjournalAmountsjournalDateSpan matchpatsjournalAccountInfo groupPostingscalculateBalancespostingsByAccount juSequenceparseJournalWithsetYeargetYear setCommodity getCommoditypushParentAccountpopParentAccountgetParentAccount expandPath fileSuffix nullledgerjournalToLedgerledgerAccountNames ledgerAccountledgerAccountsledgerTopAccountsledgerAccountsMatchingledgerSubAccountsledgerPostingsledgerAccountTreeledgerAccountTreeAtledgerDateSpan accountnamesaccountaccounts topaccountsaccountsmatching subaccountspostings commodities accounttree accounttreeat rawdatespan ledgeramountstests_Hledger_Datareader journalFilejournalAddFile emptyLineledgerExclamationDirectiveledgerHistoricalPriceledgerDefaultYearledgerdatetimeledgeraccountname someamount tests_Hledger_Read_JournalReader tests_Hledger_Read_TimelogReaderjournalFromPathAndStringreadJournalFile readJournal myJournalPath myTimelogPath myJournal myTimelogtests_Hledger_ReadbomstripBOMbaseGHC.Base++foldrGHC.Listconcatfilterzipmap GHC.Classes>=fail>>=>>returnMonadFunctorOrd Control.Monad MonadPlusghc-prim GHC.TypesChar GHC.OrderingOrderingString HUnit-1.2.2.3Test.HUnit.Text runTestTTshowPath showCounts runTestTextputTextToShowSputTextToHandlePutTextTest.HUnit.Base performTest testCaseCount testCasePaths~:~?=~=?~?@?=@=?@? assertEqual assertString assertBoolassert Assertable listAssertListAssertableAssertionPredicateassertionPredicateAssertionPredicableTestCaseTestList TestLabelTesttestTestablefailureserrorstriedcasesCountscountspathState ReportStart ReportProblemPathListItemLabelNodeTest.HUnit.Lang assertFailure Assertion Text.PrintfhPrintfprintf PrintfType HPrintfType PrintfArgIsChar Debug.Trace traceShowtrace putTraceMsgData.Ord comparing Data.Listunwordswordsunlineslinesproductsumfoldl1'foldl1foldl'unfoldrsortBysort permutations subsequencestailsinitsgroupBygroupdeleteFirstsByunzip7unzip6unzip5unzip4zipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4genericReplicate genericIndexgenericSplitAt genericDrop genericTake genericLength minimumBy maximumByminimummaximuminsertByinsert mapAccumR mapAccumL partition transpose intercalate intersperse intersectBy intersectunionByunion\\deleteBydeletenubBynub isInfixOf isSuffixOf isPrefixOf findIndices findIndexfind elemIndices elemIndex stripPrefix Data.Char isSeparatorisSymbol isPunctuationisNumberisMarkisLettergeneralCategory digitToIntUppercaseLetterLowercaseLetterTitlecaseLetterModifierLetter OtherLetterNonSpacingMarkSpacingCombiningMark EnclosingMark DecimalNumber LetterNumber OtherNumberConnectorPunctuationDashPunctuationOpenPunctuationClosePunctuation InitialQuote FinalQuoteOtherPunctuation MathSymbolCurrencySymbolModifierSymbol OtherSymbolSpace LineSeparatorParagraphSeparatorControlFormat Surrogate PrivateUse NotAssignedGeneralCategory GHC.UnicodetoTitletoUppertoLower isAsciiUpper isAsciiLowerGHC.Read readLitChar lexLitCharmfilterapliftM5liftM4liftM3liftM2liftMunlesswhen replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMjoinvoidforever<=<>=>msumforM_forMfilterMguardmapM_mapM sequence_sequence=<<mplusmzeroGHC.Show intToDigit showLitCharunzip3unzipzipWith3zipWithzip3!! concatMaplookupnotElemelemallanyorandreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanr1scanrfoldr1scanl1scanlfoldllengthnullinitlasttailhead Data.MaybemapMaybe catMaybes listToMaybe maybeToList fromMaybefromJust isNothingisJustmaybeNothingJustMaybeordchrfmapminmax<=><compareisAsciiisLatin1 isControlisPrintisSpaceisUpperisLowerisAlphaisDigit isOctDigit isHexDigit isAlphaNumGTEQLTcontainers-0.4.0.0 Data.TreeunfoldForestM_BFunfoldTreeM_BF unfoldForestM unfoldTreeM unfoldForest unfoldTreelevelsflatten drawForestdrawTree subForest rootLabelTreeForest regexpr-0.5.3 Text.RegexPR gsubRegexPRBy gsubRegexPR subRegexPRBy subRegexPR splitRegexPRggetbrsRegexPR getbrsRegexPR gmatchRegexPRmultiMatchRegexPR matchRegexPR time-1.2.0.3Data.Time.LocalTime.LocalTimeutcToLocalZonedTime getZonedTimezonedTimeToUTCutcToZonedTimelocalTimeToUT1ut1ToLocalTimelocalTimeToUTCutcToLocalTimelocalTimeOfDaylocalDay LocalTime zonedTimeZonezonedTimeToLocalTime ZonedTimeData.Time.LocalTime.TimeOfDaytimeOfDayToDayFractiondayFractionToTimeOfDaytimeOfDayToTimetimeToTimeOfDaylocalToUTCTimeOfDayutcToLocalTimeOfDaymakeTimeOfDayValidmiddaymidnighttodSectodMintodHour TimeOfDayData.Time.LocalTime.TimeZonegetCurrentTimeZone getTimeZoneutctimeZoneOffsetStringtimeZoneOffsetString'hoursToTimeZoneminutesToTimeZone timeZoneNametimeZoneSummerOnlytimeZoneMinutesTimeZoneData.Time.ClockgetCurrentTimeData.Time.Clock.UTCDiff diffUTCTime addUTCTimeData.Time.Clock.UTC utctDayTimeutctDayUTCTimeNominalDiffTimeData.Time.Calendar.GregorianaddGregorianYearsRollOveraddGregorianYearsClipaddGregorianMonthsRollOveraddGregorianMonthsClipgregorianMonthLength showGregorianfromGregorianValid fromGregorian toGregorianData.Time.Calendar.OrdinalDate isLeapYearData.Time.Calendar.DaysdiffDaysaddDaystoModifiedJulianDayModifiedJulianDayDayData.Time.Clock.ScalepicosecondsToDiffTimesecondsToDiffTimegetModJulianDate ModJulianDate UniversalTimeDiffTime lowercase uppercasestriplstriprstripdropws elideLeft elideRightrootsubsbranches tracewith parseerrorshowParseErrorshowDateParseError orDatesFromnextday startofdaythisweekprevweeknextweek startofweek thismonth prevmonth nextmonth startofmonth thisquarter prevquarter nextquarterstartofquarterthisyearprevyearnextyear startofyearnthdayofmonthcontainingnthdayofweekcontaining firstJust datesepchars datesepcharmonths monthabbrevsweekdaysweekdayabbrevs monthIndexmonIndex nulldatespannulldatetests_Hledger_Data_DatesnonsimplecommoditycharsquoteCommoditySymbolIfNeededunknowndollareuropoundhourdollarseurospoundshoursdefaultcommoditiestests_Hledger_Data_CommoditysimilarAmountsOpconvertAmountToSimilarCommodityshowAmountWithPrecisionshowAmountWithoutPrice!showAmountWithoutPriceOrCommodity showPriceshowPriceDebug showAmountshowamountquantitypunctuatenumber isZeroAmountisReallyZeroAmountisNegativeAmountisReallyZeroMixedAmount!normaliseMixedAmountIgnoringPrice.normaliseMixedAmountPreservingHighestPrecision$sumAmountsPreservingHighestPrecision"amountopPreservingHighestPrecision acctsepcharaccountNameTreeFrom1nullaccountnametreeaccountNameTreeFrom2accountNameTreeFrom3 emptyTreetests_Hledger_Data_AccountName nullpostingpostingTypeFromAccountNametests_Hledger_Data_Postingtests_Hledger_Data_Transactiontests_Hledger_Data_TimeLognullfilterspec negateprefix isnegativepatabspattests_Hledger_Data_Journalnullaccttests_Hledger_Data_Accounttests_Hledger_Data_LedgerQuantityformatdetectparse ledgercommentledgercommentline ledgerIncludeledgerAccountBeginledgerAccountEndledgerModifierTransactionledgerPeriodicTransactionledgerIgnoredPriceCommodityledgerCommodityConversionledgerTagDirectiveledgerEndTagDirectiveledgerDefaultCommodityledgerTransaction ledgerdateledgereffectivedate ledgerstatus ledgercodeledgermetadataledgermetadatalineledgerpostingslinebeginningwithspaces ledgerpostingtransactionaccountname postingamountleftsymbolamountrightsymbolamountnosymbolamountcommoditysymbolquotedcommoditysymbolsimplecommoditysymbol priceamountnumber timelogFile timelogentryreadersreaderForFormatensureJournalFile emptyJournal