cef9aede93
Previously we relied on MixedAmount being a Num, which allows +, -, sum, negate, fromInteger etc. to be used with MixedAmounts. While convenient, this Num instance is not (and can't be) fully implemented or law abiding, so it's possible to misuse it, potentially leading to bugs. Now, MixedAmount is a lawful Monoid (and a Semigroup), so you can combine (add) MixedAmounts with <> or mconcat and represent zero with mempty. However, we recommend using the following more abstract API, which will insulate you from future implementation changes: maPlus (instead of +) maMinus (instead of -) maNegate (instead of negate) maSum (instead of sum/sumStrict) nullmixedamt (instead of 0) And when constructing MixedAmounts, avoid the Mixed constructor, instead use: mixed :: [Amount] -> MixedAmount mixedAmount :: Amount -> MixedAmount maAddAmount :: MixedAmount -> Amount -> MixedAmount maAddAmounts :: MixedAmount -> [Amount] -> MixedAmount For now the Num instance remains, as a convenience for scripters and for backward compatibility, but for production code you should probably consider it deprecated. |
||
---|---|---|
.github | ||
.sandstorm | ||
bin | ||
checks | ||
doc | ||
docker | ||
examples | ||
hledger | ||
hledger-install | ||
hledger-lib | ||
hledger-ui | ||
hledger-web | ||
shell-completion | ||
tools | ||
.ci | ||
.ctags | ||
.dockerignore | ||
.editorconfig | ||
.ghci | ||
.gitignore | ||
.hlint.yaml | ||
.mailmap | ||
.version | ||
azure-pipelines.yml | ||
bench.sh | ||
cabal.project | ||
CHANGES.md | ||
CONTRIBUTING.md | ||
CREDITS.md | ||
dev.hs | ||
Dockerfile | ||
hie.yaml | ||
LICENSE | ||
Makefile | ||
Makefile.helpsys | ||
README.md | ||
ROADMAP.md | ||
Shake.hs | ||
stack7.10.yaml.disabled | ||
stack8.0.yaml | ||
stack8.2.yaml | ||
stack8.4.yaml | ||
stack8.6.yaml | ||
stack8.8.yaml | ||
stack.yaml |
hledger project README
lightweight, portable, dependable accounting tools
hledger is a computer program for easily tracking money, time, or other commodities, on unix, mac and windows (and web-capable mobile devices, to some extent).
It is first a command-line tool, but there are also terminal and web interfaces, and a Haskell library for building your own programs and scripts (hledger is written in Haskell). hledger was inspired by and is largely compatible with Ledger. hledger is free software available under the GNU General Public License v3+.
hledger aims to help both computer experts and regular folks to gain clarity and control in their finances and time management, but currently it is a bit more suited to techies. I use it every day to:
- track spending and income
- see time reports by day/week/month/project
- get accurate numbers for client billing and tax filing
- track invoices
Though limited in features, hledger is lightweight, usable and reliable. For some, it is a simpler, less distracting, more future-proof alternative to Quicken or GnuCash.
For more, see the home page: https://hledger.org
Sponsorship
Your support, large or small, helps keep this project strong!
See also https://hledger.org#sponsorship.
Sponsor Simon (project leader):
Sponsor the hledger project as an organisation:
Sponsor the hledger project as an individual: