Commit Graph

10616 Commits

Author SHA1 Message Date
Simon Michael
7092ef9a89 fix: commented test for #1849 2022-03-25 19:42:49 -10:00
Stephen Morgan
bffb6c8c82 ref: smartdate: Improve ergonomics of SmartDate constructors. 2022-03-25 19:10:58 -10:00
Simon Michael
97e57c2cb5 imp: doc: clarify relative dates in periodic rules (#1845) 2022-03-25 16:44:57 -10:00
Simon Michael
9a8fb529f3 imp: add a test clarifying periodic txns with forecast (#1845) 2022-03-25 16:30:35 -10:00
Simon Michael
e5e7468521 stack: 9.2: silence new warnings for now 2022-03-25 16:08:21 -10:00
Simon Michael
d70c547b15 imp: fix Foundation runExceptT import (#1847) 2022-03-25 16:08:16 -10:00
Simon Michael
d60e1464d5 imp: fix MonadIO import (#1847) 2022-03-25 14:49:56 -10:00
Stephen Morgan
31c7c5d1ca fix: Clean up build failures due to redundant imports and duplicate
function.
2022-03-26 11:37:32 +11:00
Stephen Morgan
603b2e9f09 ref: Use ExceptT String IO a instead of IO (Either String a).
This increases composability and avoids some ugly case handling. We
re-export runExceptT in Hledger.Read.

The final return types of the following functions has been changed from
IO (Either String a) to ExceptT String IO a. If this causes a problem,
you can get the old behaviour by calling runExceptT on the output:
readJournal, readJournalFiles, readJournalFile

Or, you can use the easy functions readJournal', readJournalFiles', and
readJournalFile', which assume default options and return in the IO
monad.
2022-03-25 14:23:27 -10:00
Simon Michael
ce169d0543 tools: clarify hie-mac.yaml 2022-03-25 11:50:15 -10:00
Simon Michael
0818c44a6c tools: make buildtimes*: switch to GHC 9.2, add unoptimised variants
On mac m1, 9.2 builds almost 3x faster than 9.0,
and building unoptimised gives another 2x speedup.
2022-03-25 11:49:52 -10:00
Simon Michael
e93e4ed5a7 pkg: update stack9.2.yaml 2022-03-25 11:47:23 -10:00
Simon Michael
0c9829d004 tools: make buildtimes*: also build hledger executable 2022-03-25 09:01:30 -10:00
Simon Michael
0b53035c7a tools: make buildtimes-cabal: show times without double compilation 2022-03-25 08:19:17 -10:00
Simon Michael
9b2bed8e41 tools: make buildtimes: show GHC codegen times 2022-03-25 07:42:28 -10:00
Simon Michael
2d82349525 doc: FUNDING.md -> FINANCE.md, link to new finance repo 2022-03-23 11:38:46 -10:00
Simon Michael
4eeb646912 test: errors: doc updates 2022-03-20 07:21:31 -10:00
Simon Michael
5281c5d647 imp: allow pivoting on 'status' also 2022-03-18 21:38:31 -10:00
Simon Michael
2ed4201e36 test: errors: doc updates 2022-03-18 12:47:12 -10:00
Simon Michael
10160351e9 test: errors: doc updates 2022-03-18 12:32:54 -10:00
Simon Michael
81c7f91202 test: errors: doc updates 2022-03-18 12:31:28 -10:00
Simon Michael
726978d1c5 test: errors: doc updates 2022-03-18 12:22:36 -10:00
Simon Michael
78da46c789 test: errors: doc updates 2022-03-18 12:10:36 -10:00
Simon Michael
d3cabb5494 test: errors: doc updates 2022-03-18 12:01:50 -10:00
Simon Michael
b584774a03 ci: fix a typo I fat-fingered 2022-03-18 11:03:30 -10:00
Simon Michael
25e706eca0 test: errors: doc updates 2022-03-18 11:03:21 -10:00
Simon Michael
8729fc0c47 test: errors: note versions 2022-03-18 09:02:06 -10:00
Simon Michael
512ebdfd5f test: errors: fix link, update summary 2022-03-18 08:50:20 -10:00
Simon Michael
eaa6e202f3 test: errors: show current errors in doc, generated by showall 2022-03-18 08:25:58 -10:00
Simon Michael
f7625343f6 test: errors: rename tests like check command's checks 2022-03-18 07:16:04 -10:00
Simon Michael
2b2d643333 test: errors: make tests runnable 2022-03-18 06:59:33 -10:00
Simon Michael
3775b97f04 test: errors: document 2022-03-17 19:44:47 -10:00
Simon Michael
6510ba3c95 test: examples for reproducing journal errors 2022-03-17 17:38:26 -10:00
Stephen Morgan
e6bf04fce3 fix: aliases: Make sure we can escape forward slashes in account
aliases, but otherwise the regular expression handler handles escapes.
2022-03-16 19:01:03 -10:00
Stephen Morgan
cbdd86f4dc imp: reg: areg: Align to first 1000 postings by default, rather than 100.
This has the same performance characteristics for a big decrease in alignment
issues. 1000 postings seems to still put it under the memory bottleneck.
2022-03-11 13:25:38 -10:00
Simon Michael
129f37cfe6 reg: tweak --align-all help (#1839) 2022-03-11 07:16:55 -10:00
Simon Michael
64d1927384 reg: document --align-all (#1839) 2022-03-11 07:16:33 -10:00
Stephen Morgan
c0cc9e73c1 dev: reg: areg: Be more clever about register and aregister alignment.
When rendering register or aregister reports, calculate the amount /
balance width based on the first 100 items, and start rendering in that
way. If you encounter a longer one, update and continue rendering. This
will result in adjustment of column width for long reports, but allows
us to save a lot more performant/efficient.

This can be disabled with the new --align-all flag.

We also only render each amount once, rather than twice as before, by
storing the rendered amount in a tuple.
2022-03-11 06:47:48 -10:00
Stephen Morgan
cbc985d411 dev: reg: areg: Speed up reg and areg by only aligning to first 1000 items. 2022-03-10 17:42:04 -10:00
Stephen Morgan
4a80551406 fix: price: Make sure inferred market prices have the correct sign with
total prices. (#1813)

Also reduce duplication for inferring market prices (previously it was
done separately in both Hledger.Data.Journal and
Hledger.Cli.Commands.Prices), and remove *TotalPriceToUnitPrice
functions, since unit prices cannot represent all total prices.

Add a helper function numDigitsInt to get the number of digits in an
integer, which has a surprising number of ways to get it wrong.
2022-03-10 17:34:49 -10:00
Stephen Morgan
45408183fe dev: reg: areg: Strip prices early on in PostingsReport and AccountTransactionsReport, when possible.
This results in big speedups in cases when we have many transaction prices, like in examples/10000x1000x10.journal. This can be disabled with the show_costs_ option in ReportOpts.
2022-03-10 17:21:40 -10:00
Simon Michael
25e3cca2e1 doc: regex aliases update (#1832) 2022-03-10 17:13:34 -10:00
Stephen Morgan
a65e64115a fix: alias: Allow escaped characters in regular expression aliases. (#982) 2022-03-10 17:00:03 -10:00
Stephen Morgan
852ba7b100 fix: bin: Get hledger-print-location working. 2022-03-10 16:56:46 -10:00
Stephen Morgan
19ed6d3f00 cln!: sourcepos: Use megaparsec-supplied sourcePosPretty.
Change showSourcePos to sourcePosPretty, and showSourcePosPair to
sourcePosPairPretty.
2022-03-10 16:56:28 -10:00
Simon Michael
f0e00b3a43 ;doc: update changelogs 2022-03-10 16:55:46 -10:00
Simon Michael
c7afe77cd9 doc: credits: keep names on one line 2022-03-10 16:25:32 -10:00
Simon Michael
965266a5b7 doc: releasing: cleanups 2022-03-08 15:25:10 -10:00
Simon Michael
54f5e983c1 doc: releasing: tweaks 2022-03-08 14:59:29 -10:00
Simon Michael
12de1cf753 doc: releasing: tweaks 2022-03-08 14:58:39 -10:00