hledger/hledger-lib/Hledger/Data
Simon Michael 856c0b3042 lib: fix bracketed posting dates, parser cleanup (#304)
Bracketed posting dates were fragile; they worked only if you wrote full
10-character dates. Also some semantics were a bit unclear. Now they
should be robust, and have been documented more clearly. This is a
legacy undocumented Ledger syntax, but it improves compatibility and
might be preferable to the more verbose "date:" tags if you write
posting dates often (as I do).

Internally, bracketed posting dates are no longer considered to be tags.
Journal comment, tag, and posting date parsers have been reworked, all
with doctests. Also the journal parser types generally have been
tightened up and clarified, making it much easier to know how to combine
and run them. There's now

-- | A parser of strings with generic user state, monad and return type.
type StringParser u m a = ParsecT String u m a

-- | A string parser with journal-parsing state.
type JournalParser m a = StringParser JournalContext m a

-- | A journal parser that runs in IO and can throw an error mid-parse.
type ErroringJournalParser a = JournalParser (ExceptT String IO) a

and corresponding convenience functions (and short aliases) for running them.
2016-04-28 13:34:57 -07:00
..
Account.hs lib: clarify flattenAccounts 2015-09-02 16:22:08 -07:00
AccountName.hs balance, print; more wide char support (#242) 2015-09-28 18:33:18 -10:00
Amount.hs ui: txn: show multi-commodity amounts on one line 2015-10-29 18:10:06 -07:00
Commodity.hs strip trailing whitespace from all Haskell files 2014-10-14 18:48:24 -07:00
Dates.hs allow year parser to handle arbitrarily large years 2015-07-12 12:32:53 -07:00
Journal.hs rename timelog format to timeclock 2016-04-12 21:13:19 -07:00
Ledger.hs refactor amount filtering helpers 2014-05-23 13:10:36 -07:00
Posting.hs print: fix wide char support, add tests (#242) 2015-10-10 11:53:28 -07:00
RawOptions.hs cli: with a repeated flag, the last takes precedence 2014-12-04 12:41:47 -08:00
StringFormat.hs doc: balance --format does not support - any more 2015-10-10 15:07:49 -07:00
Timeclock.hs rename timelog format to timeclock 2016-04-12 21:13:19 -07:00
Transaction.hs lib: more ergonomic balance assertion errors 2016-02-10 07:40:18 -08:00
Types.hs lib: fix bracketed posting dates, parser cleanup (#304) 2016-04-28 13:34:57 -07:00