PeriodData's use of Int keys caused wrong results with periodic reports involving dates outside the machine-specific limits of Int. Those were: 64 bits: -25252734927764696-04-22..25252734927768413-06-12 32 bits: -5877752-05-08..5881469-05-27 16 bits: 1769-02-28..1948-08-04 8 bits: 1858-07-12..1859-03-24 32 bits is supported by MicroHS; 16 and 8 bits aren't supported by any known haskell version, but that could change in future. For example, on 64 bit machines we got: 25252734927768413-06-12 PeriodData's max date (expenses) 1 25252734927768414-01-01 next year past PeriodData's max date (expenses) 2 $ hledger reg -O csv --yearly "txnidx","date","code","description","account","amount","total" "0","-25252734927764696-11-10","","","expenses","1","1" Now it uses Integer (like the time package), fixing the bug. And benchmarking shows memory and time usage slightly improved (surprisingly; tested with up to 500 subperiods, eg hledger -f examples/10ktxns-1kaccts.journal reg -1 cur:A -D >/dev/null) |
||
|---|---|---|
| .. | ||
| Hledger | ||
| test | ||
| Text | ||
| .date.m4 | ||
| .ghci | ||
| .version | ||
| .version.m4 | ||
| CHANGES.md | ||
| hledger-lib.cabal | ||
| Hledger.hs | ||
| LICENSE | ||
| package.yaml | ||
| README.md | ||
| Setup.hs | ||
hledger-lib
A reusable library containing hledger’s core functionality. This is used by most hledger* packages so that they support the same common file formats, command line options, reports etc.
See also: the project README and home page.