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
22a8020296
make most types instances of Data (and Typeable)
...
This allows them to be pretty-printed with pprint (from data-pprint)
when debugging, and shouldn't have much impact otherwise.
2013-12-06 13:19:43 -08:00
Simon Michael
2de58e2ec0
fix haddock errors in Reports.hs
2013-09-28 10:14:43 -07:00
Simon Michael
7e06a6a24c
balance: basic multi-column balance (change) reports
2013-09-26 15:06:48 -07:00
Simon Michael
d6c841d93b
show search queries more accurately in --debug output
2013-09-23 11:50:20 -07:00
Simon Michael
671bb6c4a2
require data-pprint as a debugging aid and make some types compatible with it
2013-09-21 13:36:43 -07:00
Simon Michael
8444be6f88
docs: report haddock cleanups
2013-09-10 13:42:57 -07:00
Simon Michael
f9656a21af
print: comment positions (same line or next line) are now preserved
2013-09-10 10:32:49 -07:00
Simon Michael
7ed0705398
register: --average/-A
shows a running average, like ledger
2013-09-09 18:25:53 -07:00
Simon Michael
3d205ec03f
refactor: rename unclear helper
2013-09-09 17:41:29 -07:00
Simon Michael
060d1fdd1b
change comm: to sym: and require a match on the whole symbol
2013-09-09 15:26:45 -07:00
Simon Michael
957f57a07b
new comm:REGEXP query matches commodity symbols. Also some minor amt: fixes.
2013-09-09 15:04:43 -07:00
Simon Michael
73230838c5
parsing: amt queries use the = operator by default
2013-09-09 11:57:25 -07:00
Simon Michael
eff1d3f1a5
csv reader: add the include
directive, useful for factoring out common rules used with multiple CSV files
2013-08-03 20:53:41 -07:00
Dmitry Astapov
ed58d815d6
Fix for multiple field assignments in CSV parsing
2013-06-19 08:30:33 +01:00
Simon Michael
080eb866ec
web: clean up language extensions a bit, make autoweb works again
2013-06-04 18:23:55 -07:00
Simon Michael
e13ea5706d
oops, missed a build failure
2013-06-04 11:43:26 -07:00
Simon Michael
fd8de9558e
web: show proper Y-values in register chart ( fixes #122 )
2013-06-03 23:15:30 -07:00
Simon Michael
2e5718d5ea
web: show one line per commodity in charts. Needs more polish, but fixes #109 .
2013-06-01 15:33:33 -07:00
Simon Michael
95f909543a
fix a haddock failure reported by hydra
2013-06-01 13:55:34 -07:00
Simon Michael
c2fa4b3c21
parsing: make balance assertions more robust with different precisions ( #119 )
...
Also note another issue.
2013-06-01 13:39:00 -07:00
Simon Michael
44545d6ec7
parsing: update a csv reader error message
2013-06-01 12:38:58 -07:00
Simon Michael
a26ab926d8
parsing: don't fail when a csv amount has trailing whitespace ( fixes #113 )
2013-06-01 12:38:13 -07:00
Simon Michael
56a37aabcf
small cleanup
2013-05-30 15:17:21 -07:00
Simon Michael
6073b56b9e
parsing: order postings first by date, then by parse order when checking balance assertions
2013-05-30 15:16:54 -07:00
Simon Michael
5685b3dc9c
parsing: don't allow = in unquoted commodity symbols, fixes commodity-less balance assertion amounts
2013-05-30 15:15:38 -07:00
Simon Michael
87820705f5
parsing: after reading a journal file, check all balance assertions and continue only if they pass
2013-05-28 16:25:00 -07:00
Simon Michael
0be986fcb9
parsing: actually parse balance assertions
...
Parser unit test is commented out until HTF tests are fixed.
2013-05-28 16:22:30 -07:00
Simon Michael
e89bd131e9
also fix warnings in UTF8IOCompat
2013-04-12 16:28:29 -07:00
Simon Michael
42385fc8bf
parsing: read dos line endings, deprecate encoding compatibility layer
...
We should now read all text in universal newline mode, so eg journal
files with DOS/windows line endings are fine.
This also deprecates and disables our IO encoding compatibility layer,
which prevented many encoding-related problems with certain platforms
and GHC versions. With modern GHC (7.x) this is now hopefully totally
unnecessary, but the module remains in place just in case.
2013-04-12 16:18:20 -07:00
Simon Michael
78837c66a6
parsing: fix test breakage due to new csv rules format ( fixes #102 )
2013-04-12 14:59:28 -07:00
Simon Michael
616a25979a
CSV reader version 2 with new rules syntax
...
At long last. The main change is a new rules file format that aims to
be more powerful and more intuitive than v1 (hledger 0.19.x and older).
Existing rules files will need to be adapted manually to the new format.
2013-03-29 22:56:55 +00: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
70b171e018
querying by code:
2013-03-22 17:59:16 +00:00
Simon Michael
c39e424642
basic querying by amount: "amt:<0", "amt:=100", etc.
...
The syntax is "amt:ON", where O is "<", "=" or ">" and N is a number.
For simple (single-commodity) amounts, this matches if the amount's quantity has the specified relationship to N.
For multi-commodity amounts, it always matches.
If parsing fails, an error is raised.
This has not been tested for floating-point precision.
2013-03-20 16:36:00 +00:00
Simon Michael
9ffb0b2d1f
export journal file code parser, part 2 - missed a bit >:|
2013-02-25 19:35:51 +00:00
Simon Michael
69f2491224
export journal file code parser
2013-02-24 21:07:54 +00:00
Simon Michael
33153851e9
words' on an empty string should return empty list
2013-02-24 20:04:28 +00:00
Simon Michael
2a6a028222
register: date display refinements
...
- when showing multiple postings from a transaction, show their individual dates accurately
- with --date2, use that date for sorting
2013-02-14 21:12:35 +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
7175c57992
reg: --related/-r flag to show other postings in the transaction
2012-12-22 00:24:38 +00:00
Simon Michael
552a15a1ba
reg: --width/-w option to adjust register overall output width
2012-12-21 21:56:11 +00:00
Simon Michael
621a91807e
rename actual/effective dates to primary/secondary
...
The command-line flag is now --date2. Alternate spellings --effective and --aux-date
are accepted for compatibility.
2012-12-06 04:43:41 +00:00
Simon Michael
7d1fce42fe
refactor: dead code
2012-12-06 03:56:12 +00:00
Simon Michael
869ff2528a
accept normal simple date syntax in posting dates, give an error on bad date syntax here
2012-12-06 03:23:56 +00:00
Simon Michael
20e68f23a8
support effective dates on postings as well
...
We now preserve all dates while reporting, instead of overwriting one with the other.
2012-12-06 02:41:37 +00:00