Commit Graph

57 Commits

Author SHA1 Message Date
Simon Michael
e838ed0637 fix a Control.Monad.Error warning (#239) 2015-03-29 16:12:05 -07:00
Simon Michael
d2877a919a add some type signatures in Utils, helps ghci-web 2015-02-09 17:42:51 +00:00
Julien Moutinho
cf28985cf2 lib: move from Text.ParserCombinators.Parsec to Text.Parsec
NOTE: required to use liftIO in includedirective
SEE: http://www.vex.net/~trebla/haskell/parsec-generally.xhtml#IO
2014-11-20 10:08:30 +01:00
Simon Michael
69636f70fb extract debug helpers into a module 2014-10-28 18:40:22 -07:00
Simon Michael
f064ecf138 fix a splitAtElement bug with adjacent separators 2014-10-24 14:30:00 -07:00
Simon Michael
b6774f47a3 balance, print: add -o and CSV output here too
Not very elegant yet, but works.
2014-10-21 12:02:23 -07:00
gwern
d1618aaca8 strip trailing whitespace from all Haskell files 2014-10-14 18:48:24 -07:00
Simon Michael
3ce34b145c add missing dbgN helpers 2014-07-28 18:57:54 -07:00
Simon Michael
8aec855d04 note dbg0 is like ltrace 2014-07-17 15:06:28 -07:00
Simon Michael
04f6162e19 extract regular expression utils module 2014-07-06 10:11:02 -07:00
Simon Michael
647d5833ff clarify dbgAtM issue 2014-07-02 23:24:58 -07:00
Simon Michael
ec51d28839 web: a bunch of ui cleanup & improvement
- 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
2014-06-13 00:19:00 +01:00
Simon Michael
6871c4cce5 dbgtrace, does a trace if --debug was used 2014-05-09 17:52:23 -07:00
Simon Michael
9d10cfa180 fix single-quote-containing addon arguments harder 2014-04-15 13:07:43 -07:00
Simon Michael
0d1d3ed057 fix an error when running an addon with an argument containing a single quote
More crazy quote engineering.. seems more robust than before.
2014-04-15 11:45:30 -07:00
Simon Michael
c93b19cb10 more debug utils, dbg0/dbg1/dbg2 2014-04-13 12:49:05 -07:00
Simon Michael
577ff7902c dbgAtM, monadic version of dbgAt 2014-04-03 18:49:56 -07:00
Simon Michael
a05810f8e0 dbgAt 2014-04-03 18:49:56 -07:00
Simon Michael
784e9eff8a dbg(ppshow) output improvements
- align single-line output a little better
- start multi-line output on a new line and indent it
2014-04-03 18:49:56 -07:00
Simon Michael
c5a839b309 3/4/5-tuple accessors 2014-04-03 18:49:56 -07:00
Simon Michael
ef1cc06cab avoid pretty-show with GHC < 7.4; update tested-with (fixes #155)
hledger builds with GHC 7.2 through 7.8. 7.0 is not supported
because we require shakespeare which requires the DeriveGeneric extension.
2014-03-27 12:29:34 -07:00
Simon Michael
467c50e06c fix a redundant import 2014-03-19 17:32:35 -07:00
Simon Michael
59cbc230d8 drop data-pprint for now, does not support ghc 7.8
The data-pprint and pretty-show packages used for debugging
tend to be poorly supported, drop one of them for now.
2014-03-19 16:11:46 -07:00
Clint Adams
7f2ffe2e45 Use regex-tdfa instead of regex-compat-tdfa 2013-12-28 13:31:58 -05:00
Simon Michael
8261ac0f56 three fixes to handle --debug=N like --debug 2013-12-07 06:09:39 -08:00
Simon Michael
3cf53661f3 new debug helpers; --debug=N sets debugLevel
The debug level set by `--debug[=N]` is now available to pure and
startup code as debugLevel, using unsafePerformIO.

`dbg LABEL ...` is now the go-to helper for tracing values on the
console; it produces output when the debug level is non-zero. `dbgExit`
is similar but exits immediately, avoiding further output. The
`dbgshow`, `dbgppshow` and `dbgpprint` variants allow control over the
pretty-printing method and required debug level, allowing more control
over what is displayed when.

Other cleanups: lstrace -> ltrace, pdbgAt -> pdbg, tracewith -> traceWith.
2013-12-06 13:35:50 -08:00
Simon Michael
af5c0e80e0 parsing: read files in universal newline mode
Line endings other than the unix style, are now accepted in journal and rules files.
2013-03-29 18:46:10 +00:00
Simon Michael
7b6a59123d eolof parser matches end of line or end of file 2013-03-29 18:42:00 +00:00
Simon Michael
972106b145 update ptrace, add dbg, ppShow utilities 2013-03-29 18:40:10 +00:00
Simon Michael
3b5c0bc4a1 provide some regex-posix-based utilities that perform better than regexpr 2013-03-29 18:39:57 +00:00
Simon Michael
b780badd07 provide "when" 2013-03-29 18:38:43 +00:00
Simon Michael
33153851e9 words' on an empty string should return empty list 2013-02-24 20:04:28 +00:00
Simon Michael
67d1f91909 web: fix compilation; also fixes some hardcoded static urls (Xinruo Sun) 2013-01-11 13:54:49 +00:00
Simon Michael
51a8adf273 regexSplit, ptrace (parsec trace) utilities 2012-12-05 23:49:50 +00:00
Simon Michael
157c85a915 move stripbrackets to Utils 2012-12-04 00:03:42 +00:00
Simon Michael
5c972ef00c more correct debug util name 2012-11-19 21:17:43 +00:00
Simon Michael
d2aa8ca6cb note future debug tools 2012-11-15 17:46:48 +00:00
Simon Michael
5b9c5459be web: make hledger[-lib] compatible with all of yesod's language extensions
Useful when building all of hledger-web at once.
2012-11-14 17:25:02 +00:00
Simon Michael
00f22819ae balance report speedup
This refactoring fixes an O(n^2) slowdown in the balance command with
large numbers of accounts. It's now speedy, and the implementation is
clearer. To facilitate this, the Account type now represents a tree of
accounts which can easily be traversed up or down (and/or flattened
into a list).

Benchmark on a 2010 macbook:

    +-------------------------------------------++--------------+------------+--------+
    |                                           || before:      | after:     |        |
    |                                           || hledger-0.18 | hledgeropt | ledger |
    +===========================================++==============+============+========+
    | -f data/100x100x10.journal     balance    ||         0.21 |       0.07 |   0.09 |
    | -f data/1000x1000x10.journal   balance    ||        10.13 |       0.47 |   0.62 |
    | -f data/1000x10000x10.journal  balance    ||        40.67 |       0.67 |   1.01 |
    | -f data/10000x1000x10.journal  balance    ||        15.01 |       3.22 |   2.36 |
    | -f data/10000x1000x10.journal  balance aa ||         4.77 |       4.40 |   2.33 |
    +-------------------------------------------++--------------+------------+--------+
2012-10-21 17:18:18 +00:00
Simon Michael
0b96a767b4 support tilde (~) in journal and rules file paths 2012-05-30 08:36:01 +00:00
Simon Michael
6ccecb6ae0 stats: list included journal files 2012-05-30 09:17:18 +00:00
Simon Michael
3ee6a351f3 big query/tests/show refactoring
- use new query system for command line too, filterspec is no more
- move unit tests near the code they test, run them in bottom up order, add more
- more precise Show instances, used for debugging not ui
2012-05-27 18:14:20 +00:00
Simon Michael
1654776f4a refactor test runner 2012-05-14 19:23:12 +00:00
Simon Michael
68966fe43b begin cleaning up Dates api, move firstJust 2012-04-16 16:44:41 +00:00
Simon Michael
8492f6cae4 fix unicode handling on GHC >= 7.2, unify utf8 IO compatibility layer
tests pass again from GHC 6.12.3 to 7.4.1
2012-03-29 19:06:31 +00:00
Simon Michael
d4451ce5e3 read system cleanup, require conversion rules from a file to simplify API 2012-03-24 18:08:11 +00:00
Simon Michael
8521c07df7 assertParseFailure 2011-05-31 19:48:55 +00:00
Simon Michael
287eb6bd00 refactor: drop dropws 2011-07-15 21:58:20 +00:00
Simon Michael
f2171c1e02 choice' haddock 2011-07-17 17:16:40 +00:00
Simon Michael
a44aa8d7d2 refactor: remove unnecessary LANGUAGE CPP pragmas 2011-07-17 23:29:57 +00:00