* Replace Parsec with Megaparsec (see #289)
This builds upon PR #289 by @rasendubi
* Revert renaming of parseWithState to parseWithCtx
* Fix doctests
* Update for Megaparsec 5
* Specialize parser to improve performance
* Pretty print errors
* Swap StateT and ParsecT
This is necessary to get the correct backtracking behavior, i.e. discard
state changes if the parsing fails.
The journal/timeclock/timedot parsers, instead of constructing (opaque)
journal update functions which are later applied to build the journal,
now construct the journal directly (by modifying the parser state). This
is easier to understand and debug. It also removes any possibility of
the journal updates being a space leak. (They weren't, in fact memory
usage is now slightly higher, but that will be addressed in other ways.)
Also:
Journal data and journal parse info have been merged into one type (for
now), and field names are more consistent.
The ParsedJournal type alias has been added to distinguish being-parsed
and finalised journals.
Journal is now a monoid.
stats: fixed an issue with ordering of include files
journal: fixed an issue with ordering of included same-date transactions
timeclock: sessions can no longer span file boundaries (unclocked-out
sessions will be auto-closed at the end of the file).
expandPath now throws a proper IO error (and requires the IO monad).
Commit 0a90ef4 a few weeks ago caused hledger-ui to show wrong balances
after reloading with the g key, if the journal had changed and you had
specified a query on the command line.
Now, journalReloadIfChanged reloads the full journal without filtering,
like journalReload and withJournalDo.
The initial query specified by command line arguments is now preserved
when the journal is reloaded. This does not appear in the web UI, it's
like an invisible extra filter.
Make these modules' names more like the heavily-used types they
define (CliOpts, UIOpts, WebOpts). This is consistent with
RawOptions and ReportOptions, and helps with code navigation.
- show a background color for future and less-than-zero regions
- show points for transactions, not all line corners
- hovering over point shows balance, date, posted amount and transaction
- clicking a point scrolls towards that date
- ctrl plus/ctrl minus adds/removes posting fields
- clicking the more link or pressing tab in the last field also works
- the focus is adjusted sensibly
- the add form is reset if closed and reopened, except the number of postings
- keyboard shortcuts should be less dependent on focus now
- tested in recent firefox, chrome, safari
- things should be robust with typeahead, with one notable exception:
typeahead is not enabled in the new account fields when you add
postings. I tried hard, help welcome.
The add form has become a modal dialog, and been moved into the default
template. This simplifies some things, for now. Eg it's easily
accessible from any page.
- the web UI has been streamlined; edit form, raw & entries views dropped
- we now remember whether sidebar is open or closed
- better help dialog
- keyboard shortcuts are now available
- better add form
- more bootstrap styling
- static file cleanups
- report filtering fixes
- upgrade jquery to 2.1.1, bootstrap to 3.1.1, drop select2, add typeahead, cookie, hotkeys
- clarify debug helpers a little
- refactoring
Use the javascript library select2 to autocomplete descriptions and
account names when adding a transaction. The autocomplete searches by
substring, prefix and infix. New values will also be accepted.
This replaces dhtmlxcombo library so it is removed. Also updated jquery
to the latest 1.10.1.
The web app's journal state is now kept in the yesod App as an IORef,
instead of using io-storage.
yesod devel now works; it uses the journal file specified by
$LEDGER_FILE, or ~/.hledger.journal.
web: update journal state handling, fix yesod devel - WIP