hledger/hledger-lib
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
..
Hledger lib: Include sign in TotalPrice in Amount, rather than relying on the sign of 2021-02-23 14:54:39 -08:00
other/ledger-parse lib: restrict imports, avoiding GHCI clashes 2016-11-20 10:27:16 -08:00
test ci: --pedantic is too much for now 2020-03-07 14:53:12 -08:00
Text lib: Rename alignCell to textCell, minor cleanups. 2021-01-15 12:56:48 -08:00
.date.m4 ;tools: split defs.m4 to minimise manual rebuilding 2020-12-15 09:39:29 -08:00
.ghci tools: .ghci for each package, sets shorter prompt 2016-04-15 16:06:45 -07:00
.version ;bump version to 1.20.99 2020-12-14 11:28:07 -08:00
.version.m4 ;tools: split defs.m4 to minimise manual rebuilding 2020-12-15 09:39:29 -08:00
CHANGES.md ;doc: changelog updates 2020-12-29 10:21:27 -08:00
hledger-lib.cabal ;regenerate cabal files with the hpack version in current stack 2021-02-18 13:42:40 -08:00
Hledger.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
LICENSE split off hledger-lib package, containing core types & utils 2010-03-22 01:44:59 +00:00
package.yaml lib,cli: Use Text for CSV values. 2021-01-02 15:08:09 +11:00
README.md ;doc: more tweaks to package readmes, hackage descriptions 2020-03-22 10:49:02 -07:00
Setup.hs Revert "remove Setup.hs files again, fixing a yesod devel warning" 2014-05-24 13:39:09 -07:00

hledger-lib

A reusable library containing hledgers 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.