hledger/hledger-lib/Hledger
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
..
Data lib: Include sign in TotalPrice in Amount, rather than relying on the sign of 2021-02-23 14:54:39 -08:00
Read lib: Include sign in TotalPrice in Amount, rather than relying on the sign of 2021-02-23 14:54:39 -08:00
Reports cli: rename --infer-value to --infer-market-price 2021-02-05 15:16:39 -08:00
Utils lib: Expose textConcatBottomPadded. 2021-01-15 12:56:48 -08:00
Data.hs move JSON instances from hledger-web to hledger-lib 2019-12-16 17:17:00 -08:00
Query.hs lib: matchesDescription, matchesPayeeWIP 2021-01-17 16:37:38 -08:00
Read.hs lib,cli: Assorted fixes for older GHC. 2021-01-02 15:08:09 +11:00
Reports.hs lib,cli: Store parsed Query in ReportOpts, rather than an unparsed 2020-10-23 14:14:11 -07:00
Utils.hs lib: Make Default instances clearer, remove Default instance for Bool. 2020-10-23 14:14:11 -07:00