gwern0
357f56d0f4
de-haskell98
2010-03-09 01:51:21 +00:00
Simon Michael
a50d3e2b71
refactor, allow in-module unit tests
...
Until now, all unit tests were defined in Tests.hs. Pro: simple, makes
code/test line counting easy. Con: tests are far from code, Tests.hs turns
into a big wall of test code. Now, unit tests can also be defined in modules.
To avoid name clashes and template haskell complexity, a dumb manual
naming scheme is used: any module may export a hunit Test(List) named
tests_ModuleName. These are manually aggregated and re-exported when
appropriate, eg in Commands.All and finally in Tests.hs.
2010-03-08 21:47:36 +00:00
Simon Michael
3969dff3fc
parsing: @ was being treated as a currency symbol; a few more tests
2010-03-06 21:47:10 +00:00
ob
8937ed457d
GHC 6.12.1 has UTF8 support on board. Using System.IO.UTF8 can cause problems.
...
Therefore use System.IO.UTF8 only on previous versions.
Testet with GHC 6.10.4 and 6.12.1
2010-02-13 20:00:34 +00:00
Simon Michael
5018fd459d
docs: update Amount haddock
2009-12-12 21:10:39 +00:00
Simon Michael
d3083ef316
docs: Date haddock
2009-12-12 22:19:57 +00:00
Simon Michael
b0006ce83f
fix some non-utf8-aware file reading ( #15 )
2009-12-12 22:20:44 +00:00
Simon Michael
50200e38ed
more cleanup, move journal text into Journal
2009-12-21 05:43:10 +00:00
Simon Michael
2edb9e4a79
register: make reporting intervals honour a display expression ( #18 )
2009-12-21 06:03:34 +00:00
Simon Michael
86f14b10a9
doc: slight clarification of Transaction
2010-02-02 21:34:26 +00:00
Simon Michael
c08bccb158
parsing: use actual (ie, first) date's year as a default for the effective (ie, second) date
2010-02-03 21:19:01 +00:00
Simon Michael
30dee8cc7d
resolve conflicts (Add Ledger.Amount.convertMixedAmountTo function)
2010-02-04 16:40:30 +00:00
Roman Cheplyaka
5c23ebd01b
Add Ledger.Amount.convertMixedAmountTo function
2009-09-26 22:52:30 +00:00
Simon Michael
357b27fb63
fix an unsafe ! in ledgerAccount; clarify that withLedgerDo does not cache the ledger
2010-02-04 20:55:12 +00:00
Simon Michael
71c6b13717
chart: filter based on opts & args
2010-02-04 21:11:59 +00:00
Simon Michael
a2b8faa4d6
big refactoring, do filtering afresh in each command
...
We now do data filtering/massage as late as possible, not just once at
startup. This should work better for multiple commands, as with web or ui.
The basic benchmark seems at least as good as before thanks to laziness.
2009-12-21 05:23:07 +00:00
Simon Michael
23e3c81acc
cleanups
2009-12-19 06:26:33 +00:00
Simon Michael
60bda57a26
drop LedgerPosting, it's no longer needed; more rename cleanups
2009-12-19 05:57:54 +00:00
Simon Michael
19ff69bb83
docs: haddock
2009-12-19 01:56:04 +00:00
Simon Michael
de48b8ce46
docs: update LedgerPosting haddock
2009-12-19 01:17:28 +00:00
Simon Michael
42e5382673
docs: haddock
2009-12-19 01:56:12 +00:00
Simon Michael
dbfc9f3624
docs: fix haddock
2009-12-16 17:59:06 +00:00
Simon Michael
59c199e1a8
docs: wording
2009-12-19 03:09:55 +00:00
Simon Michael
ec95b0723c
make Postings reference their parent Transaction
...
With this change, Transactions and Postings reference each other
co-recursively. This makes constructing them more tedious, but it
may also allow LedgerPostings to be dropped and code to be simplified.
Time and space performance of register and balance is as before.
2009-12-19 03:44:52 +00:00
Simon Michael
8405072ff6
refactor
2009-12-20 15:50:54 +00:00
Simon Michael
f1813fbb0e
more LedgerTransaction/Transaction/LedgerPosting field renames
2009-12-16 17:58:51 +00:00
Simon Michael
30b83bb105
rename LedgerTransaction to Transaction
2009-12-16 08:07:26 +00:00
Simon Michael
0656d575ac
rename Transaction to LedgerPosting
2009-12-16 07:58:06 +00:00
Simon Michael
2e9b27da0d
rename RawLedger to Journal
2009-12-16 07:00:43 +00:00
Simon Michael
79880de744
don't let ledgercomment parser always pass
2009-06-20 04:01:25 +00:00
Simon Michael
29bf134624
better postings parse error
2009-06-20 04:09:59 +00:00
Simon Michael
f7e8ae1c55
whitespace parsing tweak
2009-06-21 14:42:59 +00:00
Simon Michael
d1cb9cedae
fix a regex bug in showtree
2009-08-12 06:40:01 +00:00
marko.kocic
afa2d065bd
Hlint: Error: Monad law, right identity
2009-09-22 10:50:02 +00:00
marko.kocic
af3ad2abe1
Hlint: Error: Redundant return
2009-09-22 12:17:25 +00:00
marko.kocic
5c687ab275
Hlint: Error: Use concatMap
2009-09-22 12:25:31 +00:00
marko.kocic
f51083c1ff
Hlint: Error: Use fewer imports
2009-09-22 12:26:26 +00:00
Simon Michael
20878df544
hlint: use getContents
2009-09-23 17:43:23 +00:00
Simon Michael
a8e510d789
tighten up some imports
2009-07-09 19:03:08 +00:00
Simon Michael
7b1458c9a5
don't break if HOME is undefined
2009-11-19 01:48:37 +00:00
Simon Michael
26848584ee
fix a warning
2009-11-19 02:00:48 +00:00
Simon Michael
042a2ad45e
allow (and ignore) a time in price records
2009-11-19 02:02:12 +00:00
Simon Michael
37f08a35c0
register: refactor layout code
2009-11-25 06:13:35 +00:00
Simon Michael
f924cbbd4a
docs: typo
2009-11-25 13:55:11 +00:00
Simon Michael
17da24710a
docs: update amount haddock
2009-11-25 13:31:08 +00:00
Simon Michael
92c87f088a
docs: updates
2009-11-25 17:44:51 +00:00
Simon Michael
48f6e03325
docs: haddock fixes
2009-11-25 12:57:30 +00:00
Simon Michael
5cfc8cf630
fix a tricky mixedamount arithmetic bug
2009-11-25 19:42:13 +00:00
marko.kocic
4407b6c59d
Hlint: Warning: Use if
2009-09-23 09:29:31 +00:00
Simon Michael
c06580ff2a
print: show end of line comments; all tests now passing
2009-11-25 21:51:31 +00:00