Commit Graph

2949 Commits

Author SHA1 Message Date
Stephen Morgan
4e0dcec096 fix: areg: Explicitly avoid filtering by depth queries, perform
valuation after all reportq filtering is done (in both the historical
and recent postings), and make sure filtering is done at the correct
point based on whether --txn-dates is set. (#1634)
2021-08-02 22:47:50 -10:00
Simon Michael
1d0b2bf9ce ;doc: update changelogs 2021-08-01 08:05:05 -10:00
Stephen Morgan
fc8aa602cf lib!: modifyTransactions now takes a Map of commodity styles, and will
style amounts according to that argument. journalAddForecast and
journalTransform now return an Either String Journal.

This improves efficiency, as we no longer have to restyle all amounts in
the journal after generating auto postings or periodic transactions.
Changing the return type of journalAddForecast and journalTransform
reduces partiality.

To get the previous behaviour for modifyTransaction, use modifyTransaction mempty.
2021-07-30 13:52:35 -10:00
Stephen Morgan
04a36d4942 ref: Refactor journalFinalise to clarify flow.
The only semantic difference is that we now apply
journalApplyCommodityStyles before running journalCheckAccountsDeclared
and journalCheckCommoditiesDeclared.
2021-07-30 13:52:35 -10:00
Stephen Morgan
c537f9426b dev: lens: Use lenses for updateReportSpec(With). 2021-07-30 09:27:39 -10:00
Stephen Morgan
4e9db4e377 dev: lens: Introduce lenses for ReportOpts and ReportSpec. 2021-07-30 09:27:39 -10:00
Simon Michael
2f819725e5 ;lib: accountTransactionsReport: clarify 2021-07-30 09:09:49 -10:00
Stephen Morgan
9df574b3c0 fix: reg: register --related should not create duplicate postings when
more than one posting in a transaction matches. (#1629)
2021-07-30 09:06:27 -10:00
Stephen Morgan
6528f25593 fix: lib: Filter postings before performing valuation and costing in
MultiBalanceReport, PostingsReport, EntriesReport, and
AccountTransactionsReport. (#1625, #1630)
2021-07-30 09:06:27 -10:00
Simon Michael
78e9f8877c ;doc: changelogs: lib edits 2021-07-28 14:48:17 -10:00
Simon Michael
e4a23c95d4 ;doc: changelogs: gather 1.22.1 changes 2021-07-28 10:03:22 -10:00
Simon Michael
666e217bd5 ;doc: update changelogs 2021-07-27 23:21:13 -10:00
Simon Michael
d2b799a717 feat: bal: select budget( transaction)s by name (#1612)
This makes it possible to keep multiple named budgets in one journal,
and select the one you want with --budget's argument.

More precisely, you can select the subset of periodic transactions
rules which contain a certain fixed, case-insensitive substring.

Only one such --budget argument is supported, the last one on the
command line takes precedence.
2021-07-23 10:38:20 -10:00
Stephen Morgan
b0aa70b27a lib!: Rename the fields of ReportSpec.
This is done to be more consistent with future field naming conventions,
and to make automatic generation of lenses simpler. See discussion in
\#1545.

rsOpts -> _rsReportOpts
rsToday -> _rsDay
rsQuery -> _rsQuery
rsQueryOpts -> _rsQueryOpts
2021-07-23 10:37:08 -10:00
Stephen Morgan
7ed2a0aa9b lib!: lib: Remove aismultiplier from Amount.
In Amount, aismultiplier is a boolean flag that will always be False,
except for in TMPostingRules, where it indicates whether the posting
rule is a multiplier. It is therefore unnecessary in the vast majority
of cases. This posting pulls this flag out of Amount and puts it into
TMPostingRule, so it is only kept around when necessary.

This changes the parsing of journals somewhat. Previously you could
include an * before an amount anywhere in a Journal, and it would
happily parse and set the aismultiplier flag true. This will now fail
with a parse error: * is now only acceptable before an amount within an
auto posting rule.

Any usage of the library in which the aismultiplier field is read or set
should be removed. If you truly need its functionality, you should
switch to using TMPostingRule.

This changes the JSON output of Amount, as it will no longer include
aismultiplier.
2021-07-22 19:06:33 -10:00
Stephen Morgan
3969eb2679 lib!: lib,cli,ui,web: For accountTransactionsReport, generate the overall
reportq from the ReportSpec, rather than being supplied as a separate
option.

This is the same approach used by the other reports, e.g. EntryReport,
PostingReport, MultiBalanceReport. This reduces code duplication, as
previously the reportq had to be separately tweaked in each of 5
different places.

If you call accountTransactionreport, there is no need to separately
derive the report query.
2021-07-22 19:00:37 -10:00
Stephen Morgan
f673e7c2eb lib!: lib,web: Remove unused TransactionReport. Move the useful utility
functions to AccountTransactionsReport.

If you use transactionsReport, you should either use entryReport if you
don't require a running total, or using accountTransactionsReport with
thisacctq as Any or None (depending on what you want included in the
running total).
2021-07-22 19:00:37 -10:00
Stephen Morgan
58516eea77 imp: json: Decrease indentation in JSON output. 2021-07-20 23:28:18 -10:00
Simon Michael
6569c2aca7 ;doc: update changelogs 2021-07-20 22:24:39 -10:00
Simon Michael
861c34484e test: skip doctests with GHC 9 for now (#1503, #1615) 2021-07-20 20:38:39 -10:00
Simon Michael
3ef9958041 test: doctest cleanups, use latest 2021-07-20 20:38:39 -10:00
Simon Michael
9aac520edd deps: allow megaparsec 9.1 2021-07-20 20:38:39 -10:00
Stephen Morgan
c606f874fb imp: json: The keys of JSON objects are now displayed in alphabetical order, making it stable across different systems and compilers. 2021-07-20 20:37:33 -10:00
Simon Michael
87f575e643 ref: bal: rename some report types to clarify/sync with docs
ReportType -> BalanceCalculation
 ChangeReport -> CalcChange
 BudgetReport -> CalcBudget
 ValueChangeReport -> CalcValueChange

BalanceType -> BalanceAccumulation
 PeriodChange -> PerPeriod
 CumulativeChange -> Cumulative
 HistoricalBalance -> Historical

ReportOpts:
 reporttype_ -> balancecalc_
 balancetype_ -> balanceaccum_

CompoundBalanceCommandSpec:
 cbctype -> cbcaccum

Hledger.Reports.ReportOptions:
 balanceTypeOverride -> balanceAccumulationOverride
2021-07-15 14:22:20 -10:00
Simon Michael
964a019368 ;doc: changelogs: minor release headings 2021-07-13 18:39:43 -10:00
Simon Michael
1f9d89879d ;doc: update changelogs 2021-07-13 18:39:40 -10:00
Stephen Morgan
2df8ad781e
imp: cli: Don't show extra double quotes in missing journal file error. (#1601) 2021-07-13 10:41:51 -10:00
Stephen Morgan
cf25d7d56d
imp: bal: more predictable sort order with multiple commodities (#1563, #1564)
This change provides more predictable and intuitive behaviour when 
using -S/--sort-amount with multiple commodities. 
It implements a custom Ord (and Eq) instance for MixedAmount 
which substitutes zero for any missing commodities.

As a consequence, all the ways of representing zero with a MixedAmount ([],
[A 0], [A 0, B 0, ...]) are now Eq-ual (==), whereas before they were
not. We have not been able to find anything broken by this change.

* imp: lib: Compare MixedAmounts by substituting zero for any missing commodities. (#1563)
* ;doc: Update docs for new multicommodity sort by amount rules.
2021-07-12 21:11:50 -10:00
Simon Michael
a681e5329d fix: ui: transaction: possibly off-by-one valuation date
I'm not sure if it arose in practice, but: ensure TransactionScreen
in V mode would correctly use the journal's last day as valuation date,
not the day after that.
2021-07-12 18:50:06 -10:00
Simon Michael
5d2caf3c7f lib: clarify journalEndDate, add journalLastDay 2021-07-12 18:50:06 -10:00
Simon Michael
3cd80e1f57 lib: export transactionCheckBalanced (#1596) 2021-07-07 13:20:13 -10:00
Simon Michael
68e7ff4644 ;doc: finalise changelogs 2021-07-03 14:51:51 -10:00
Simon Michael
52ebfb3dce ;doc: changelog edits 2021-07-03 11:45:50 -10:00
Simon Michael
4971b106ef ;doc: changelog edits 2021-07-02 16:10:56 -10:00
Simon Michael
d5d19f8419 ;update manuals 2021-07-02 12:42:34 -10:00
Stephen Morgan
e2198ff1ee lib: Auto-postings with Amount queries should filter only those commodities which match the query.
Also corrects a regression introduced in
8ab29f84b3 where transaction modifier
postings without multipliers would incorrectly be filtered by commodity.
2021-07-01 09:35:56 -10:00
Simon Michael
2b3f6e86b8 ;doc: changelog updates 2021-06-30 18:05:50 -10:00
Stephen Morgan
2a9d358627 lib: Make sure automatic postings generated from postings with more than one commodity match on commodity symbol (#1582). 2021-06-30 17:35:43 -10:00
Stephen Morgan
bb7d04c031 lib,cli: No longer strip prices in journalApplyValuationFromOptsWith and mixedAmountApplyValuationAfterSumFromOptsWith (#1577).
These were theoretically an efficiency improvement, but have been
error-prone. We instead handle stripping prices at the point of
consumption.
2021-06-30 16:45:05 -10:00
Stephen Morgan
613efba1bc ui: Do not log to debug.log when regenerating journal in Transaction
screen (#1556). Also really clear cost setting when doing so.

Since plog is no longer used anywhere, and tends to create bugs when it
is, we remove it.
2021-06-30 16:07:32 -10:00
Simon Michael
43a909f824 doc: changelogs draft
And add big headings, for fun and to help me tell them apart.
2021-06-30 15:30:57 -10:00
Simon Michael
26bc5e6df3 ;update cabal files 2021-06-28 22:38:12 -10:00
Simon Michael
544450f557 ;bump version to 1.22 2021-06-28 22:37:47 -10:00
Simon Michael
59b1e46b88 ;check, payees, journal: payee directive no longer consumes trailing whitespace (#1580) 2021-06-23 14:13:24 -10:00
Simon Michael
46d3eaf920 ;lib: clarify/extend/refactor some line parsing helpers (#1580) 2021-06-23 14:12:17 -10:00
Stephen Morgan
0df3a4714f lib: When performing a summary posting report without depth limiting,
report exclusive balances rather than inclusive balances (#1568).
2021-06-11 16:53:39 -10:00
Simon Michael
b81f8f768d ;csv: amount-setting notes, doc improvements from reddit discussion
https://www.reddit.com/r/plaintextaccounting/comments/nxu1ss/hledger_parsing_csv_with_negative_amount_in_debit/
2021-06-11 16:30:43 -10:00
Simon Michael
665fec83cd
Merge pull request #1560 from Xitian9/rationalisevaluation
Clean up valuation functions, and make clear which to use where.
2021-06-07 19:02:44 -10:00
Stephen Morgan
0f1837816d lib,cli,ui,web: Add check balancednoautoconversion command, which checks that
transactions are balanced possibly using explicit prices, but without
inferring any prices. This is included in --strict mode.

Renames check autobalanced to check balancedwithautoconversion.
2021-06-07 18:58:58 -10:00
Stephen Morgan
0a019e2167 lib,cli,web,bin: Replace journalSelectingAmountFromOpts with journalApplyValuationFromOpts.
This also has the effect of allowing valuation in more reports, for
example the transactionReport.
2021-06-08 14:55:05 +10:00
Stephen Morgan
68e975adf1 lib,cli,ui,web: Remove unused LANGUAGE pragmas. 2021-06-07 17:33:54 -10:00
Stephen Morgan
55308e1ca8 lib,cli,ui,web: Remove unnecessary CPP when dropping support for GHC 8.2. 2021-06-07 17:33:54 -10:00
Stephen Morgan
c827cbcc3e lib: Refactor to eliminate use of printf. 2021-06-03 23:23:54 -10:00
Stephen Morgan
e80bb37b1c lib: Remove unused String utility functions. 2021-06-03 23:23:54 -10:00
Stephen Morgan
0b419adba2 lib: Remove unused Text utility functions. 2021-06-03 23:23:54 -10:00
Stephen Morgan
bf22c3efdd lib,cli: Replace concat(Top|Bottom)Padded with textConcat(Top|Bottom)Padded. 2021-06-03 23:23:54 -10:00
Stephen Morgan
0e59fee251 lib,cli: Export Text.Tabular from Text.Tabular.AsciiWide, clean up import lists. 2021-06-03 23:23:54 -10:00
Simon Michael
b681cde62d ;update cabal files 2021-06-03 14:08:47 -10:00
Simon Michael
58b481ca5b stack: updated tested-with to 8.6+ 2021-06-03 14:07:39 -10:00
Simon Michael
1e2ff1315b Don't infer a txn price with same-sign amounts (#1551) 2021-06-02 15:22:57 -10:00
Stephen Morgan
6c2ab5c940 lib: When matching an account query against a posting, don't try to
match against the same posting twice, in cases when poriginal is
Nothing.
2021-05-16 12:43:13 -10:00
Simon Michael
d3b20675d0 tools: really regenerate the cabal files with stack's hpack
hpack has dropped the hash at last, this should help a lot to reduce
edit conflicts and commit noise.
2021-05-14 16:14:06 -10:00
Simon Michael
41c8e1f6ef ;regen cabal files with latest stack's hpack (0.34.4) 2021-05-14 08:17:56 -10:00
Stephen Morgan
940b2c6ab9 lib: Create mixedAmountApplyValuationAfterSumFromOptsWith for doing any valuation needed after summing amounts. 2021-05-13 22:18:52 +10:00
Stephen Morgan
6fb3dfdbb2 lib: Create journalApplyValuationFromOpts.
This does costing and valuation on a journal, and is meant to replace
most direct calls of costing and valuation. The exception is for reports
which require amounts to be summed before valuation is applied, for
example a historical balance report with --value=end.
2021-05-13 19:52:32 +10:00
Stephen Morgan
dc16451de0 lib: Remove unused (amount|mixedAmount|posting|transaction)ApplyCostValuation functions. 2021-05-07 22:25:19 +10:00
Stephen Morgan
53611be6e9 lib,ui: Do all cost conversion and price stripping in journalSelectingAmountFromOpts. 2021-05-07 21:51:15 +10:00
Stephen Morgan
d1467d4766 lib: When inferring total prices, use the precision of toamount, rather than NaturalPrecision. 2021-05-02 21:14:36 +10:00
Stephen Morgan
686a0871a9 lib: Make sure fromamount and toamount have opposite signs when inferring prices.
Also change priceInferrerFor so that it would give the correct
(negative) prices when fromamount and toamount have the same sign.
2021-05-02 21:14:36 +10:00
Stephen Morgan
0078f1a520 lib: Infer prices correctly even when there are only balance assignments. 2021-05-01 09:45:29 -10:00
Stephen Morgan
7cb621b82f lib,cli,ui,bin: Remove unnecessary normalisedMixedAmount, replace
normaliseMixedAmountSquashPricesForDisplay with mixedAmountStripPrices.
2021-05-01 09:45:29 -10:00
Stephen Morgan
4780a02e5a lib,cli: Remove showAmounts*B functions, replacing them entirely with showMixedAmount*B functions. 2021-05-01 09:45:29 -10:00
Stephen Morgan
5e7b69356f lib: Change internal representation of MixedAmount to use a strict Map
instead of a list of Amounts. No longer export Mixed constructor, to
keep API clean (if you really need it, you can import it directly from
Hledger.Data.Types). We also ensure the JSON representation of
MixedAmount doesn't change: it is stored as a normalised list of
Amounts.

This commit improves performance. Here are some indicative results.

hledger reg -f examples/10000x1000x10.journal
- Maximum residency decreases from 65MB to 60MB (8% decrease)
- Total memory in use decreases from 178MiB to 157MiB (12% decrease)

hledger reg -f examples/10000x10000x10.journal
- Maximum residency decreases from 69MB to 60MB (13% decrease)
- Total memory in use decreases from 198MiB to 153MiB (23% decrease)

hledger bal -f examples/10000x1000x10.journal
- Total heap usage decreases from 6.4GB to 6.0GB (6% decrease)
- Total memory in use decreases from 178MiB to 153MiB (14% decrease)

hledger bal -f examples/10000x10000x10.journal
- Total heap usage decreases from 7.3GB to 6.9GB (5% decrease)
- Total memory in use decreases from 196MiB to 185MiB (5% decrease)

hledger bal -M -f examples/10000x1000x10.journal
- Total heap usage decreases from 16.8GB to 10.6GB (47% decrease)
- Total time decreases from 14.3s to 12.0s (16% decrease)

hledger bal -M -f examples/10000x10000x10.journal
- Total heap usage decreases from 108GB to 48GB (56% decrease)
- Total time decreases from 62s to 41s (33% decrease)

If you never directly use the constructor Mixed or pattern match against
it then you don't need to make any changes. If you do, then do the
following:

- If you really care about the individual Amounts and never normalise
  your MixedAmount (for example, just storing `Mixed amts` and then
  extracting `amts` as a pattern match, then use should switch to using
  [Amount]. This should just involve removing the `Mixed` constructor.
- If you ever call `mixed`, `normaliseMixedAmount`, or do any sort of
  amount arithmetic (+), (-), then you should replace the constructor
  `Mixed` with the function `mixed`. To extract the list of Amounts, use
  the function `amounts`.
- If you ever call `normaliseMixedAmountSquashPricesForDisplay`, you can
  replace that with `mixedAmountStripPrices`. (N.B. this does something
  slightly different from `normaliseMixedAmountSquashPricesForDisplay`,
  but I don't think there's any use case for squashing prices and then
  keeping the first of the squashed prices around. If you disagree let
  me know.)
- Any remaining calls to `normaliseMixedAmount` can be removed, as that
  is now the identity function.
2021-05-01 09:45:29 -10:00
Simon Michael
483fa9682e cli: ANSI color is now also disabled by -o/--output-file (#1533)
ANSI color on stdout (not stderr) is now disabled if the
-o/--output-file option is detected (and its value is not "-").

Added outputFileOption, and more advice in comments.
2021-04-17 16:51:08 -10:00
Simon Michael
fe846a0c7f ;lib: comments 2021-04-17 16:06:20 -10:00
Simon Michael
21a49b9479 ;lib: note caveats with useColor* 2021-04-14 06:23:21 -10:00
Simon Michael
6298722ade lib: debug output checks for color support on stderr, not stdout
This is more accurate.
useColor is replaced by useColorOnStdout, useColorOnStderr.
2021-04-14 06:23:21 -10:00
Simon Michael
2b04b76448 lib: debug output now respects --color/NO_COLOR/ANSI support
Debug output now selects color or monochrome in the same way as normal
output.
2021-04-14 06:23:21 -10:00
Simon Michael
5e57cfb43e lib: useColor, colorOption helpers usable anywhere 2021-04-14 06:23:21 -10:00
Simon Michael
0f4e462ae7 add a Show instance for AmountDisplayOpts, WideBuilder
For debug logging.
2021-04-13 17:19:22 -10:00
Stephen Morgan
28fd7c65f2 lib: When displaying amounts on a single line, always display at least one amount, even if that would exceed the requested maximum width. Addresses #1526. 2021-04-13 15:29:58 -10:00
Simon Michael
f5121129ec timeclock: print shows timeclock amounts with just 2 decimals, like pre-1.21 (#1527) 2021-04-12 18:40:33 -10:00
Stephen Morgan
493ed14629 lib,test: Make sure historical postings have prices stripped if necessary in PostingsReport (see issue #1522). 2021-04-11 18:31:30 -10:00
Stephen Morgan
f6feef7f80 lib,cli: Strip prices in MultiBalanceReport and PostingsReport whenever
we know we won't need them.

Knowing whether we need them is accomplished by pulling the "show-costs"
option used by the Close command up into ReportOpts.
2021-04-11 18:31:30 -10:00
Stephen Morgan
b7a2479186 lib: Use uniform naming for stripping prices.
Creates a new function amountStripPrices, and renames removePrices to
postingStripPrices.
2021-04-11 18:31:30 -10:00
Stephen Morgan
278153effa lib: Add more efficient toEncoding for custom ToJSON declarations. 2021-04-10 17:52:33 -10:00
Stephen Morgan
a529207ae7 lib: Do not round Decimal before applying JSON representation if
existing representation is small enough.

Previously the JSON representation of Decimal was rounded to 10 points
of precision before serialising. This sometimes results in an
unnecessary increase of precision.
2021-04-10 17:52:33 -10:00
Simon Michael
eb2da22f63 ;update cabal files 2021-04-04 08:03:57 -10:00
Simon Michael
ba1e91c302 drop support for GHC 8.0
Prior to this commit,
- hledger still builds with GHC 8.0
- hledger-ui does if you use the build plan specified by stack8.0.yaml,
  but you are likely to hit problems if you let cabal pick one
  (https://github.com/jtdaugherty/vty/issues/198 and others)
- hledger-web might, if you could find the right build plan

The hassles are enough and GHC 8.0 is old enough (first released in
2016) that I'm letting it go; 8.2 is the new minimum version for all
hledger packages.

This allows a bunch of cleanups to conditional imports, which I leave
for later.

Also, updated the tested-with minor versions.
2021-04-04 07:54:22 -10:00
Stephen Morgan
edbb713cf8 lib,cli: Fix ledgerDateSpan, so that in takes transaction dates into account. 2021-04-03 13:54:23 -10:00
Stephen Morgan
5fbb67b893 lib,cli: Move reportPeriodName to Hledger.Reports.ReportOptions, use it
for HTML and CSV output for compound balance reports.
2021-04-03 13:43:37 -10:00
Simon Michael
d0940bf8ce ;update cabal files 2021-03-29 08:19:54 -07:00
Simon Michael
4e644840bc lib, etc: add now-required lower bound on containers (#1514) 2021-03-29 08:19:28 -07:00
Eric Mertens
48d558fc7a Tolerate spaces in amount fields in CSV files 2021-03-26 16:39:24 -07:00
Stephen Morgan
b6e20dea13 lib,test: Simplify the JSON representation of AmountPrecision.
It now uses the same JSON representation as Maybe Word8. This means that
the JSON serialisation is now broadly compatible with that used before the
commit f6fa76bba7, differing only in
how it handles numbers outside Word8 and that it can now produce null
for NaturalPrecision.
2021-03-25 15:47:34 -07:00
Stephen Morgan
4cb9dfb5b8 lib: Properly escape quotes in csv output. 2021-03-25 09:41:42 -07:00
Stephen Morgan
4609e79f2c lib,cli,ui,web: A number of AccountName and Journal functions which are
supposed to produce unique sorted use Sets internally to be slightly
more efficient. There is also a new function journalCommodities.
2021-03-23 11:26:30 -07:00
Stephen Morgan
7fe58f1346 lib: More efficiently check whether Amounts are or look zero.
Comparing two Quantity (either with (==) or compare) does a lot of
normalisation (calling roundMax) which is unnecessary if we're comparing
to zero. Do things more directly to save work.

For reg -f examples/10000x10000x10.journal, this results in
- A 12% reduction in heap allocations, from 70GB to 62GB
- A 14% reduction in (profiled) time, from 79s to 70s
Results for bal -f examples/10000x10000x10.journal are of the same order
of magnitude.
2021-03-23 11:26:30 -07:00
Stephen Morgan
522c8a6ad3 lib: In sorting account names, perform lookups on HashSets and HashMaps,
rather than lists. This is probably not an enormous performance sink in real
situations, but it takes a huge amount of time and memory in our
benchmarks (specifically 10000x10000x10.journal).

For bal -f examples/10000x10000x10.journal, this results in
- A 23% reduction in heap allocation, from 27GiB to 21GiB
- A 33% reduction in (profiled) time running, from 26.5s to 17.9s
2021-03-23 11:26:30 -07:00
Stephen Morgan
13589aca2e doc: Remove incorrect haddock comment. 2021-03-23 11:26:30 -07:00
Stephen Morgan
f3c9bce02c lib: Minor refactor, using foldMap instead of asum . map . toList. 2021-03-23 11:26:30 -07:00
Stephen Morgan
7488140608 lib: Do not call showAmount twice for every posting.
For print -f examples/10000x10000x10.journal, this results in
- A 7.7% reduction in heap allocations, from 7.6GB to 7.1GB.
2021-03-21 07:10:27 -07:00
Stephen Morgan
7aa3d3e760 lib,cli: Some efficiency improvements in register reports.
Strip prices after valuing postings in PostingsReport.
Use renderRow interface for Register report.

For reg -f examples/10000x10000x10.journal, this results in:
- Heap allocations decreasing by 55%, from 68.6GB to 31.2GB
- Resident memory decreasing by 75%, from 254GB to 65GB
- Total (profiled) time decreasing by 55%, from 37s to 20s
2021-03-21 07:10:27 -07:00
Stephen Morgan
d54e276658 lib: Split showMixedAmountB into showMixedAmountB and showAmountsB, the
former being a simple wrapper around the latter.

This removes the need for the showNormalised option, as showMixedAmountB
will always showNormalised and showAmountsB will never do so.

We also strip prices from MixedAmount before displaying if not displaying prices.
2021-03-21 07:10:27 -07:00
Simon Michael
7fad876014 ;update manuals 2021-03-18 07:22:42 -07:00
Stephen Morgan
d6a4310d8f lib,cli,ui,bin: Eliminate all uses of Mixed outside of Hledger.Data.Amount.
Exceptions are for dealing with the pamount field, which is really just
dealing with an unnormalised list of amounts.

This creates an API for dealing with MixedAmount, so we never have to
access the internals outside of Hledger.Data.Amount.

Also remove a comment, since it looks like #1207 has been resolved.
2021-03-18 09:47:59 +11:00
Stephen Morgan
dabb3ef82e lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should
supplant the old interface, which relied on the Num typeclass.

MixedAmount did not have a very good Num instance. The only functions
which were defined were fromInteger, (+), and negate. Furthermore, it
was not law-abiding, as 0 + a /= a in general. Replacements for used
functions are:
0 -> nullmixedamt / mempty
(+) -> maPlus / (<>)
(-) -> maMinus
negate -> maNegate
sum -> maSum
sumStrict -> maSum

Also creates some new constructors for MixedAmount:
mixedAmount :: Amount -> MixedAmount
maAddAmount :: MixedAmount -> Amount -> MixedAmount
maAddAmounts :: MixedAmount -> [Amount] -> MixedAmount

Add Semigroup and Monoid instances for MixedAmount.
Ideally we would remove the Num instance entirely.

The only change needed have nullmixedamt/mempty substitute for
0 without problems was to not squash prices in
mixedAmount(Looks|Is)Zero. This is correct behaviour in any case.
2021-03-18 09:47:21 +11:00
Simon Michael
ae57e76cb3 ;update cabal files 2021-03-12 06:59:30 -08:00
Simon Michael
36cbc2b068 bump base upper bound to allow GHC 9.0 2021-03-12 06:58:46 -08:00
Simon Michael
5573538fdc ;update cabal files 2021-03-10 13:50:50 -08:00
Simon Michael
e050790d4c ;bump version to 1.21.99 2021-03-10 13:50:49 -08:00
Simon Michael
532a4622ac ;finalise changelogs 2021-03-10 11:10:13 -08:00
Simon Michael
00beaf1423 ;update cabal files 2021-03-10 08:24:59 -08:00
Simon Michael
eeddfc2509 ;bump version to 1.21 2021-03-10 08:24:58 -08:00
Simon Michael
f82bdb15e4 ;update changelogs 2021-03-10 08:24:12 -08:00
Stephen Morgan
fb02d86884 lib: Do not do any valuation with --value=cost, perform AtEnd valuation with --value=cost,COMM. 2021-03-10 12:42:01 +11:00
Simon Michael
269b25bc8d doc: edited changelogs 2021-03-09 09:31:28 -08:00
Simon Michael
51d582e845 also keep supporting --value=cost,COMM for now (#1499) 2021-03-09 07:37:52 -08:00
Simon Michael
faf68f3def ;doc: bump changelogs to latest revision 2021-03-08 15:16:54 -08:00
Simon Michael
ec4d131d22 ;doc: cherry pick recent edited changelogs from 1.21-branch 2021-03-08 15:15:57 -08:00
Simon Michael
325aa15f74 ;doc: restore changelogs up to a5f9f8ce0 2021-03-08 15:14:47 -08:00
Simon Michael
54b95af9ff ;doc: merge 1.20.3, 1.20.4 changelogs from 1.20-branch 2021-03-08 15:12:39 -08:00
Stephen Morgan
efb37c3343 lib: Default to PeriodChange report when using ValueChangeReport. 2021-03-05 10:09:14 -08:00
Stephen Morgan
3f408c2117 lib,cli: Restore old --change option for per-period summation, use --sum for basic ValueChange balance report. 2021-03-05 10:09:14 -08:00
Simon Michael
2505c69f80 lib: transactionFile 2021-03-03 06:44:25 -08:00
Stephen Morgan
edaaef897b lib: Do not include price directives in journalDateSpan. Only include
price directives after the last transaction/posting date if using
--value=end.

Also enlarges the reportspan to encompass full intervals for budget
goals.
2021-03-03 05:26:55 -08:00
Stephen Morgan
7f2536a2a7 lib,cli: Add --valuechange report type for calculating change of value
of accounts, restore --value=end behaviour to that of hledger-1.19.
2021-02-27 18:42:02 -08:00
Stephen Morgan
351648e4fa lib,cli: Add --periodic option to indicate PeriodChange accumulation (renamed from --change). 2021-02-27 18:42:02 -08:00
Stephen Morgan
f0655d1c7f lib: (amount|mixedAmount)(Looks|Is)Zero functions now check whether
both the quantity and the cost are zero. This is usually what you want,
but if you do only want to check whether the quantity is zero, you
can run mixedAmountStripPrices (or similar) before this.

(multiply|divide)(Mixed)?Amount now also multiply or divide the
TotalPrice if it is present, and the old
(multiply|divide)(Mixed)?AmountAndPrice functions are removed.
2021-02-23 14:54:39 -08:00
Stephen Morgan
9d527a9926 lib: normaliseHelper now uses a strict Map for combining amounts
internally, closing a big space leak.

This also now combines Amounts with TotalPrices in the same commodity
when normalising; amounts with TotalPrices were previously never
combined.
2021-02-23 14:54:39 -08:00
Stephen Morgan
ecca7f4e0c lib: Distinguish between an Amount having quantity (or rounded quantity 0), and having both quantity and totalprice 0 (or rounded to 0). 2021-02-23 14:54:39 -08:00
Stephen Morgan
81b778a389 lib: Make fields of Amount, AmountPrice, AmountStyle, and DigitGroupStyle strict. 2021-02-23 14:54:39 -08:00
Stephen Morgan
2ada289e28 lib: Include sign in TotalPrice in Amount, rather than relying on the sign of
aquantity.

Journal entries still require a positive @@ price, but now the sign is
set after parsing, rather than when converting in amountToCost.

The reason for this change is that, if we're going to perform arithmetic
on Amount with TotalCost, then the presence of aquantity=0 means that
amountToCost would render the total cost as 0, because signum 0 == 0.
This makes journal entries like the following impossible to balance:
2000-01-01
    a  0 @@ 10 A
    b  -10 A
2021-02-23 14:54:39 -08:00
Stephen Morgan
a65ef7cd19 lib: Consume list immediately in commodityStylesFromAmounts.
This reduced the maximum heap size per thread from ~850K to ~430K in a
real-world register test.
2021-02-23 14:54:39 -08:00
Simon Michael
5e7c4fc7bc add, print --match: prioritise infix matches
If the search description occurs in full within the other description,
that match gets a +0.5 score boost.
2021-02-20 14:08:47 -08:00
Simon Michael
44508f58c8 add, lib: debug output, refactor similar transactions lookup
add --debug=1 shows the top hits for similar past transactions.

added:
Hledger.Cli.Utils.journalSimilarTransaction
 provides --debug=1 output

changed:
Hledger.Cli.Commands.Add.transactionsSimilarTo -> Hledger.Data.Journal.journalTransactionsSimilarTo
 now takes an extra number-of-results argument
2021-02-20 13:41:37 -08:00
Simon Michael
f7bbb39a77 ;regenerate cabal files with the hpack version in current stack
To minimise warnings. They got regenerated by a commit for #1471.
2021-02-18 13:42:40 -08:00
Arnout Engelen
ad2ab3c823 Make sure to round up for the 'to' date 2021-02-17 09:05:13 -08:00
Simon Michael
b31e40ceca lib: avoid shady Not (Or []) in account type queries 2021-02-13 14:58:06 -08:00
Simon Michael
6c392e9f43 bs: don't let just a Cash declaration hide Asset accounts
Clarify the account type queries a bit, and don't let a
declaration of account as Cash cause the fallback regex
for Asset accounts to be ignored.
2021-02-13 14:54:04 -08:00
Simon Michael
b9d33a4294 bs: just declaring a Cash account no longer hides Asset accounts
Since Cash is also an Asset, declaring an account as Cash also disabled the fallback regexp for Asset accounts.
2021-02-13 08:09:45 -08:00
Simon Michael
50bfc26ca7 ;lib: commentAddTagNextLine was broken
It would not add the tag when a comment already existed.
This affected hledger-print-location.hs and probably
the generated-transaction: tag in periodic transactions.
2021-02-12 13:56:02 -08:00
Simon Michael
d865ec5d65 lib: refactor: more consistent amount precision helpers
Hledger.Data.Amount:
renamed:
setAmountPrecision -> amountSetPrecision
setFullPrecision -> amountSetFullPrecision
setMixedAmountPrecision -> mixedAmountSetPrecision
added:
mixedAmountSetFullPrecision
2021-02-05 16:09:49 -08:00
Simon Michael
d5ed8090fa ;lib: document AmountPrecision 2021-02-05 16:09:49 -08:00
Simon Michael
37e49ada70 cli: rename --infer-value to --infer-market-price
For clarity; infer-value was too vague. The old spelling remains
supported for compatibility, but is now deprecated.
When typing, --infer-market or even --infer (for now) is sufficient.
2021-02-05 15:16:39 -08:00
Simon Michael
2a4170dd3b ui: transaction: show all decimal places (like print, cf #931)
On the accounts screen and register screen we round amounts according
to commodity styles, but when you drill down to a transaction you
probably want to see the unrounded amounts.
2021-02-04 08:13:55 -08:00
Simon Michael
f52117120b lib: refactor: rename journal/transaction mapping helpers
Hledger.Data.Journal:
changed:
mapJournalTransactions -> journalMapTransactions
mapJournalPostings -> journalMapPostings
removed:
mapTransactionPostings

Hledger.Data.Transaction:
added:
transactionMapPostings
2021-02-04 08:13:55 -08:00
Simon Michael
6101368954 print: always show all decimal places (#931)
Ensures parseable and more sensible-looking output in more cases, and behaves more like Ledger's print.

There is still an issue with adding trailing zeroes, which would be nice to prevent.
2021-02-04 08:13:55 -08:00
Simon Michael
0274b30742 print: don't add decimal places in assertion/assignment amounts either (#1465) 2021-02-04 06:46:09 -08:00
Simon Michael
201f967411 print: show all decimal places in assertion/assignment amounts (#1465)
Overriding the commodity style, per https://hledger.org/hledger.html#commodity-display-style.
2021-02-03 18:11:44 -08:00
Stephen Morgan
b619b68f71 doc: Remove references to --value=cost, replacing them with --cost.
Since this is option is now just an alias for -B/--cost, and since it
may be removed soon, we make it undocumented, though it will still
behave as before. --value=cost,COMM is unsupported as well.
2021-01-28 13:57:48 -08:00
Stephen Morgan
c9eb7d1bcf lib,cli,ui: Separate costing from valuation; each can now be specified
independently.

You can now combine costing and valuation, for example "--cost
--value=then" will first convert to costs, and then value according to
the "--value=then" strategy. Any valuation strategy can be used with or
without costing.

If multiple valuation and costing strategies are specified on the
command line, then if any of them include costing
(-B/--cost/--value=cost) then amounts will be converted to cost, and for
valuation strategy the rightmost will be used.

--value=cost is deprecated, but still supported and is equivalent to
--cost/-B. --value=cost,COMM is no longer supported, but this behaviour can be
achieved with "--cost --value=then,COMM".
2021-01-28 13:57:48 -08:00
Stephen Morgan
130739e3ef lib,cli,ui: Introduce *ApplyCostValuation functions, which perform both
costing and valuation.

This currently is given a dummy NoCost argument and is equivalent to
"maybe id (*ApplyValuation ...)", but provides a constant interface so
that internal behaviour can be changed freely.
2021-01-28 13:57:48 -08:00
Stephen Morgan
9881ec9652 lib: Use mapMixedAmount more, decreasing reliance on internal representation of Mixed. 2021-01-28 13:57:48 -08:00
Stephen Morgan
9cf5015958 lib: bal --value=end without --historical should not report on fluctuation in value of historical postings. 2021-01-28 13:57:48 -08:00
Simon Michael
bf328e4e3c lib: matchesDescription, matchesPayeeWIP 2021-01-17 16:37:38 -08:00
Simon Michael
422329fbfa lib: journalPayeesUsed, journalPayeesDeclaredOrUsed 2021-01-17 16:37:38 -08:00
Simon Michael
db9b034037 lib: Journal: avoid a build failure if monad-extras is installed 2021-01-17 16:37:38 -08:00
Stephen Morgan
5d664fc528 lib: Expose textConcatBottomPadded. 2021-01-15 12:56:48 -08:00
Stephen Morgan
217bfc5e74 lib: Rename alignCell to textCell, minor cleanups. 2021-01-15 12:56:48 -08:00
Stephen Morgan
9ad0eef69b lib: Update textConcatTopPadded to use Tabular.AsciiWide, same as concatTopPadded. 2021-01-15 12:56:48 -08:00
Stephen Morgan
2c2bd8b27e lib: Refactor unlinesB to be cleaner and more efficient. 2021-01-15 12:56:48 -08:00
Simon Michael
e1e97f977e ;journal: hints for possible future work related to #1461 2021-01-13 18:15:10 -08:00
Simon Michael
034c317496 journal: allow commodity directive to set style of no-symbol commodity (#1461)
(cherry picked from commit c5571f6468ab11ffe3cd3f86a86f0b3253be10d1)
2021-01-13 17:57:18 -08:00
Simon Michael
70bcd0a249 ;update cabal files (#1457, #1458) 2021-01-13 10:01:55 -08:00
Stephen Morgan
2b545caae5 lib: Calculate value at posting date for register --value=then -M. 2021-01-12 18:20:21 -08:00
Stephen Morgan
b203822cd1 lib: Make sure to add a newline to the end of aregister report. 2021-01-10 20:50:46 -08:00
Simon Michael
c21b666130 csv: handle more sign variations, eg a sign by itself
simplifySign now covers a few more sign combinations that might arise.
And in particular, it strips a standalone sign with no number,
which simplifies sign flipping with amount-in/amount-out.
2021-01-07 10:06:38 -08:00
Simon Michael
4952ac22a1 ;lib: valuation: improve --debug=2 output 2021-01-07 08:59:04 -08:00
Simon Michael
1ad919bc6d lib: add level argument to fix traceAtWith 2021-01-07 08:57:25 -08:00
Stephen Morgan
c40db2b1eb lib: Make sure AtEnd valuation behaviour is consistent between single- and multi-period reports (#1424). 2021-01-05 14:42:09 -08:00
Stephen Morgan
83110e8820 lib,cli: Extend AtThen valuation to all report types.
Also adds a postingDate argument to amountApplyValuation, and re-orders
the ValuationType and (Transaction/Posting) arguments to
(transaction/posting)ApplyValuation, to be consistent with
amountApplyValuation.
2021-01-05 14:42:09 -08:00
Simon Michael
3d7d5c0db7 new price search that really finds the shortest path (#1443)
This one should also reliably prevent runaway searches in the event of more bugs, giving up after 1000 iterations.
2021-01-04 18:42:51 -08:00
Simon Michael
7c9303a15c lib: valuation: simplify price search code
This version tries counting recursions instead of path length, but I
think they are the same.
2021-01-03 09:49:00 -08:00
Simon Michael
73678393b1 lib: valuation: don't hang when finding prices (fixes #1439)
Searching for prices during valuation no longer now properly excludes
price loops, avoiding near infinite looping with certain
configurations of market prices. Also we now always use a direct price
when available, rather than searching unnecessarily.

Price searching progress info, useful for troubleshooting, is now
displayed with --debug=2.

There could still be some corner cases we don't handle correctly. We
now give up with an error message if the searched price chains get too
long (> 1000). More importantly, we should also give up if the search
iterates too many times, but this is not done yet.
2021-01-02 07:13:07 -08:00
Stephen Morgan
7d3cf1747a lib: Make consistent naming scheme for showMixedAmount* functions,
add conversion between old API and new API in the documentation.
2021-01-02 15:08:09 +11:00
Stephen Morgan
1f891a4145 doc: Fix some outdated documentation. 2021-01-02 15:08:09 +11:00
Stephen Morgan
e63138ef7d lib,cli: Assorted fixes for older GHC. 2021-01-02 15:08:09 +11:00
Stephen Morgan
e4e533eb9f lib,cli,ui: Replace some uses of String with Text, get rid of some unpacks, clean up showMixed options. 2021-01-02 15:08:09 +11:00
Stephen Morgan
07a7c3d3a8 lib: Use Text and Text builder only in postingAsLines. 2021-01-02 15:08:09 +11:00
Stephen Morgan
13c111da73 lib,cli,ui: Use WideBuilder for Tabular.AsciiWide.
Move WideBuilder to Text.WideString.
2021-01-02 15:08:09 +11:00
Stephen Morgan
b9c00dce61 lib,cli,ui: Implement all showMixed* functions in terms of DisplayAmountOpts and WideBuilder. 2021-01-02 15:08:09 +11:00
Stephen Morgan
0a686e220e lib: Use AmountDisplayOpts for showAmount*, reducing need for many different named functions. 2021-01-02 15:08:09 +11:00
Stephen Morgan
c86e8a9794 lib: Implement showAmountHelper using AmountBuilder. 2021-01-02 15:08:09 +11:00
Stephen Morgan
5dedec83da lib: showamountquantity shows directly, rather than parsing string output of show instance for Quantity. 2021-01-02 15:08:09 +11:00
Stephen Morgan
f998a791cf lib: Remove unused optional width argument for StringFormat. 2021-01-02 15:08:09 +11:00
Stephen Morgan
462a13cad7 lib,cli: Use Text Builder for Balance commands. 2021-01-02 15:08:09 +11:00
Stephen Morgan
089564b04b lib,cli: Use Text for CompoundPeriodicReport titles. 2021-01-02 15:08:09 +11:00
Stephen Morgan
541c4fc18c lib,cli: Use Text for CSV values. 2021-01-02 15:08:09 +11:00
Stephen Morgan
e3ec01c3c6 lib,cli,ui: Use Text for showDate and related. 2021-01-02 15:08:09 +11:00
Stephen Morgan
74b296f865 lib,cli: Make showTransaction return Text rather than String. 2021-01-02 15:08:09 +11:00
Stephen Morgan
7e44b89bb4 lib: Remove unused label on TranspactionReport and AccountTransactionsReport. 2021-01-02 15:08:09 +11:00
Stephen Morgan
5752f1c5cb lib,cli: Use Text Builder for Account Transaction Reports. 2021-01-02 15:08:09 +11:00
Stephen Morgan
12a6435c51 lib: Add wrap convenience function. 2021-01-02 15:08:09 +11:00
Stephen Morgan
646ee0bce5 cli: Using Text Builder for posting reports. 2021-01-02 15:08:09 +11:00
aragaer
2084b845e0 journal: Ignore AUTO commodity when strict checking
AUTO commodity is a placeholder for postings with missing amounts. It
should be ignored when doing a strict commodity check.

Fixes #1419
2020-12-31 09:54:23 -08:00
Simon Michael
8306420b61 check: also check "accounts"/"commodities" on demand
(cherry picked from commit 0c2bf54f2955e3a25fd0282acc42608f957abaea)
2020-12-31 08:33:36 -08:00
Simon Michael
31ea37a785 ;check: accounts, commodities, payees, ordereddates: improve errors
Error messages for these four are now a bit fancier and more
consistent. But not yet optimised for machine readability.
Cf #1436.

Added to hledger-lib: chomp1, linesPrepend[2].
2020-12-30 18:13:34 -08:00
Simon Michael
e59603a04a ;check errors: drop unwanted newline & "strict mode" prefix 2020-12-30 18:08:31 -08:00
Damien Cassou
b47d582583 ;check: fixes 2020-12-30 18:08:31 -08:00
Simon Michael
3c232fbd7d check: add "payees" check requiring payee declarations 2020-12-30 18:08:30 -08:00
Damien Cassou
e092b38631 ;lib: add 'payee' directive 2020-12-30 18:08:30 -08:00
Stephen Morgan
a64d1aa6d0 bin: Update bin scripts for current hledger-lib.
(cherry picked from commit bc4aef17b7fa13ec0754b93325e1c5e5ee04f1e7)
2020-12-30 08:59:03 -08:00
Simon Michael
6f08631be3 ;doc: changelog updates 2020-12-29 10:21:27 -08:00
Simon Michael
4a48e5f8aa ;doc: changelogs
(cherry picked from commit 3031c0e7b9)
2020-12-29 09:39:35 -08:00
Simon Michael
4ce681348d ;update changelogs
(cherry picked from commit 1b38996158)
2020-12-29 09:38:58 -08:00
Simon Michael
f2d2272737 ;update changelogs
(cherry picked from commit 15e290955f)
2020-12-29 09:37:54 -08:00
Simon Michael
12447ffab7 ;lib: restore list of hledger debug levels 2020-12-26 17:27:28 -08:00
Simon Michael
62660577c3 ;update cabal files 2020-12-24 10:22:16 -08:00
Simon Michael
a7e9e9ac0e doc: merge file format manuals into the hledger manual
Also flatten the journal manual topics a bit.

There are pros and cons to this, but I believe the pros outweigh the
cons.
2020-12-24 10:22:05 -08:00
Simon Michael
0a36823094 ;update manuals 2020-12-23 10:29:57 -08:00
Simon Michael
2d6ccd616e ;journal: doc: commodity display style examples 2020-12-22 15:38:13 -08:00
Simon Michael
324dfaee49 ;update manuals 2020-12-20 20:11:35 -08:00
Simon Michael
3d6dab7683 journal: doc: raise all headings, improving info structure 2020-12-20 20:08:35 -08:00
Simon Michael
0ff65456fa ;doc: info: tweak first/top heading again to improve structure 2020-12-20 20:08:35 -08:00
Simon Michael
9daaabeda2 ;doc: simplify manuals' title metadata to fit man/info better 2020-12-20 20:08:35 -08:00
Simon Michael
c92c27d565 doc: tweak manuals' top heading to improve info structure 2020-12-20 20:08:35 -08:00
Stephen Morgan
e406cebcce lib: Remove unused AtDefault constructor for ValuationType. 2020-12-19 11:59:44 -08:00
Stephen Morgan
46093b8de7 lib,ui: For hledger-ui, do valuation for all valuation types, not just
AtCost and AtDefault.

Remove unused valuationTypeIs* functions.
2020-12-19 11:59:44 -08:00
Stephen Morgan
cdec0f9382 lib: Remove special handling of now-inaccessible AtDefault valuation constructor.
This simplifies all the *ApplyValuation functions, as they no longer
need mreportdate or multiperiod arguments.
2020-12-19 11:59:44 -08:00
Stephen Morgan
0c23619ae7 lib: Valuation has changed; and -V now acts like --value=end. 2020-12-19 11:59:44 -08:00
Stephen Morgan
8981b3e196 lib: Include empty columns in MultiBalanceReports.
This was previously done for CompoundBalanceReport and when --empty was
called; this makes the behaviour consistent.
2020-12-18 20:54:08 -08:00
Stephen Morgan
439eddc8b9 lib: Include price directives when calculating journal end date. 2020-12-16 19:04:33 -08:00
Simon Michael
4d3a9b0a21 ;changelogs: whitespace
(cherry picked from commit 679e90eb60)
2020-12-15 20:57:18 -08:00
Simon Michael
47ab7a50a3 ;update changelogs
(cherry picked from commit 452149dfc8)
2020-12-15 20:57:09 -08:00
Simon Michael
8db8992cb5 ;update changelogs
(cherry picked from commit 03f9b756b3)
2020-12-15 20:56:44 -08:00
Simon Michael
105f7d2944 ;tools: split defs.m4 to minimise manual rebuilding 2020-12-15 09:39:29 -08:00
Simon Michael
e5a12683d7 ;update manuals 2020-12-15 09:03:38 -08:00
Simon Michael
df5c755d96 ;lib, cli: remove old unused parsec dependency 2020-12-15 08:33:05 -08:00
Simon Michael
9afccde16f ;update cabal files 2020-12-14 12:31:01 -08:00
Simon Michael
9087532b62 ;bump version to 1.20.99 2020-12-14 11:28:07 -08:00
Simon Michael
9617d0dd81 ;lib: multibalancereport sorting implementation notes (#1414, #1415) 2020-12-14 09:36:34 -08:00
Stephen Morgan
92645cca14 lib: Sorting accounts by amount should also consider account name after amounts. 2020-12-14 06:48:47 -08:00
Simon Michael
349ffd7c0b updateReportSpecFromOpts -> updateReportSpec[With] 2020-12-12 12:05:44 -08:00
Simon Michael
a10f9f4ea9 ;lib: comment 2020-12-11 11:11:15 -08:00
Simon Michael
44d59eab23 ;lib: Hledger.Utils.Debug: haddock 2020-12-09 13:55:55 -08:00
Simon Michael
51e3e9cbfa ;lib: Hledger.Utils.Debug: improve module haddock 2020-12-09 13:23:30 -08:00
Simon Michael
e9b84ca17c ;doc: journal: separate periodic rules' two meanings 2020-12-09 10:53:10 -08:00
Simon Michael
6723025607 ;update manuals 2020-12-08 20:11:32 -08:00
Simon Michael
116945e907 ;shake: man page date is now updated by manuals, not setversion 2020-12-07 12:26:48 -08:00
Simon Michael
2f91b1de6e ;update manuals 2020-12-07 06:15:59 -08:00
Simon Michael
1856ca5312 web: bump to 1.20.1; update manuals' dates 2020-12-06 18:20:56 -08:00
Simon Michael
fa28b43aed ;update changelogs 2020-12-05 17:58:37 -08:00
Simon Michael
5c5256504e ;update manuals 2020-11-30 15:21:59 -08:00
Simon Michael
5507cb07ef ;update cabal files 2020-11-30 15:19:21 -08:00
Simon Michael
2501329f3c ;bump version to 1.20 2020-11-30 15:18:24 -08:00
Simon Michael
3aec8542db ;update changelogs 2020-11-30 12:11:30 -08:00
Simon Michael
16a212af57 ;update manuals 2020-11-29 21:21:50 -08:00
Simon Michael
e33667f580 check: support quoted check name + args
A "hledger check" argument may now be a quoted string containing
the check name followed by space-separated arguments, for
checks which make use of those. This means the check command
can replicate "check-dates --unique" and (in principle)
"check-fancyassertions ASSERTIONS..". Eg:

hledger check "dates --unique"

I think it'll be better for checks to take no arguments or options,
so this is probably just a transitional feature for compatibility.
2020-11-29 20:48:31 -08:00
Simon Michael
8c23a16bf8 journal: strict mode also requires commodity declarations 2020-11-27 17:54:55 -08:00