A reliable, user-friendly Plain Text Accounting tool with command line, terminal and web interfaces.
Go to file
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
.github ;stack: build with lts-17/ghc-8.10.3 by default 2021-01-29 15:13:06 -08:00
.sandstorm Add --capabilities-header to launcher.sh 2018-06-24 17:44:22 +02:00
bin lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should 2021-03-18 09:47:21 +11:00
checks update dev setup tests 2015-03-16 17:59:06 -07:00
doc ;announce: tweak 2021-03-10 15:12:47 -08:00
docker package: added helper scripts in docker/ 2019-01-31 12:44:12 -08:00
examples ;gather investing examples 2021-03-03 04:09:41 -08:00
hledger lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should 2021-03-18 09:47:21 +11:00
hledger-install install: hledger-iadd 1.3.14 2021-03-14 10:16:09 -07:00
hledger-lib lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should 2021-03-18 09:47:21 +11:00
hledger-ui ;update cabal files 2021-03-12 06:59:30 -08:00
hledger-web ;doc: also update manual source files (#1504) 2021-03-13 07:28:14 -08:00
shell-completion Rebuild completion after the rebase on upstream/master 2021-02-28 08:36:42 +01:00
tools tools: Include more commodities and prices in generated journals. 2021-03-05 10:12:49 -08:00
.ci ;api: another round of hledger-api purging; fix the build 2019-09-11 14:49:22 -07:00
.ctags cli, lib: move functional tests into hledger/test/ 2020-11-16 08:47:41 -08:00
.dockerignore package: added Dockerfile 2019-01-29 16:14:03 -08:00
.editorconfig fix datepicker not closing, linting 2017-12-30 13:44:40 -05:00
.ghci tools: use pretty-simple for ghci output 2020-11-03 08:19:01 -10:00
.gitignore web: --test [-- HSPECARGS] runs the test suite 2020-11-16 14:02:16 -08:00
.hlint.yaml refactor: lib: hlint cleanups 2019-02-14 05:15:49 -08:00
.mailmap doc: use consistent spelling of Mykola Orliuk 2017-03-27 05:47:15 -07:00
.version ;bump version to 1.21.99 2021-03-10 13:50:49 -08:00
azure-pipelines.yml ;api: another round of hledger-api purging; fix the build 2019-09-11 14:49:22 -07:00
bench.sh benchmarks: add some large (140, 1400 columns) tabular reports 2020-11-03 17:30:10 -10:00
cabal.project ;cabal: fix cabal.project error with cabal 3.4 2021-03-12 07:01:48 -08:00
CHANGES.md ;finalise changelogs 2021-03-10 11:10:13 -08:00
CONTRIBUTING.md ;doc: contributing: draftprs.hledger.org, readyprs.hledger.org 2021-03-07 10:02:24 -08:00
CREDITS.md ;doc: CREDITS cleanup 2020-03-21 18:37:49 -07:00
dev.hs collect some langage pragmas in dev.hs 2019-02-20 18:08:33 -08:00
Dockerfile ;api: another round of hledger-api purging; fix the build 2019-09-11 14:49:22 -07:00
hie.yaml ;tools: silence hls errors for Shake.hs 2020-12-07 12:27:03 -08:00
LICENSE add LICENSE 2008-10-01 07:52:07 +00:00
Makefile ;make tag: simplify 2021-03-10 11:55:20 -08:00
Makefile.helpsys make: rename sub-makefiles; start moving site script to make/shake 2019-03-05 18:43:04 -08:00
README.md ;doc: readme: drop badges header 2020-08-21 08:18:26 -07:00
ROADMAP.md ;roadmap: status 2020-08-29 14:45:50 -07:00
Shake.hs shake: bump to lts-17.4, like the rest 2021-03-10 08:19:10 -08:00
stack7.10.yaml.disabled ;simplify stack.yaml filenames 2020-03-30 15:35:53 -07:00
stack8.0.yaml add missing dep for other stack snapshots; also bump GHC 8.10 to .2 2020-11-11 12:52:44 -08:00
stack8.2.yaml add missing dep for other stack snapshots; also bump GHC 8.10 to .2 2020-11-11 12:52:44 -08:00
stack8.4.yaml add missing dep for other stack snapshots; also bump GHC 8.10 to .2 2020-11-11 12:52:44 -08:00
stack8.6.yaml add missing dep for other stack snapshots; also bump GHC 8.10 to .2 2020-11-11 12:52:44 -08:00
stack8.8.yaml ;stack: build with lts-17/ghc-8.10.3 by default 2021-01-29 15:13:06 -08:00
stack.yaml stack: bump default to lts-17.4/ghc-8.10.4 2021-03-05 14:56:33 -08:00

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): github liberapay paypal

Sponsor the hledger project as an organisation: OpenCollective

Sponsor the hledger project as an individual: OpenCollective

Bounties for specific tasks: all bounties bountysource bounties




license hledger CI on hackage github issues