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.
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.
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.
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.
Updates inspired by some feedback from README reviewer Lars Wirzenius.
("I like that the README starts with an explanation of what the project
is all about. I like that the README is short and to the point. I like
that the license is stated explicitly.
I feel that the README doesn't really present the whole plain text
accounting concept very well, though. I realize that linked home page
goes into that much more, but it might be worth add a short example of
a ledger input file, and a sample output, to the README.")