Commit Graph

399 Commits

Author SHA1 Message Date
Simon Michael
fc8aa5253a dev: lib: Hledger.Utils.Print -> Hledger.Utils.IO 2022-11-04 18:39:31 -10:00
Simon Michael
fbd2ed5a44 ;cabal: update cabal files 2022-10-29 13:04:58 -10:00
Simon Michael
130604a2e0 ;cabal: update cabal files; migrate to hpack 0.35/stack 2.9 2022-09-19 18:23:26 -10:00
Simon Michael
427005037e cabal: update cabal files 2022-09-01 18:37:57 -07:00
Simon Michael
79792b3368 cabal: update cabal files 2022-08-29 11:15:35 +01:00
Simon Michael
b46cb8a7f7 cabal: update cabal files 2022-08-23 12:16:25 +01:00
Simon Michael
e5578e5c4e ;cabal: update cabal files 2022-08-23 02:02:19 +01:00
Simon Michael
d7f30d4fdf ;cabal: update cabal files 2022-07-11 11:18:24 +01:00
Simon Michael
f2db4c3840 ;cabal: update cabal files 2022-06-05 00:32:18 +01:00
Simon Michael
faa05764d7 ;cabal: update cabal files 2022-06-04 11:24:56 +01:00
Stephen Morgan
9155d679fe fix!: Revert "fix!: utf-8: Use with-utf8 to ensure all files are read and written with utf8 encoding. (#1619)"
This reverts commit e233f001c5.

This would break at least some people's workflow. A lighter touch is
probably sufficient.
2022-06-01 09:35:18 +10:00
Simon Michael
a9779b2377 ref: move journal checking/pretty errors down further, to Hledger.Data
now at Hledger.Data.JournalChecks*, Hledger.Data.Errors
2022-05-21 18:29:13 -10:00
Stephen Morgan
e233f001c5 fix!: utf-8: Use with-utf8 to ensure all files are read and written with utf8 encoding. (#1619)
May also fix #1154, #1033, #708, #536, #73: testing is needed.

This aims to solve all problems where misconfigured locales lead to
parsers failing on utf8-encoded data. This should hopefully avoid
encoding issues, but since it fundamentally alters how encoding is dealt
with it may lead to unexpected outcomes. Widespread testing on a number
of different platforms would be useful.
2022-05-22 13:12:19 +10:00
Simon Michael
db26456e1c imp: consolidate ordereddates check under Hledger.Read.Checks too
And remove the last vestiges of older more complex behaviour.
ordereddates now always checks all transactions in each file,
unaffected by a query. (But still affected by --date2).
2022-05-09 00:05:39 -10:00
Simon Michael
810a868c88 ref: consolidate most checks under Hledger.Read.Checks
and error message helpers in Hledger.Read.Error.
2022-05-09 00:04:33 -10:00
Simon Michael
81ad760e49 test: disable doctest for all but GHC 9.2 2022-04-25 01:36:14 -10:00
Simon Michael
353312e045 lib: enable doctests with GHC 9.2+ (#1503)
https://github.com/sol/doctest/issues/301 /
https://github.com/sol/doctest/issues/327
seem to be specific to GHC 9.0.
2022-04-25 00:33:07 -10:00
Simon Michael
db1818ac4a imp: consistent ghc warnings 2022-03-26 08:27:29 -10:00
Simon Michael
d9ecd1eb9d imp: update to modern warning flags 2022-03-25 20:28:34 -10:00
Simon Michael
af7a5f98e3 ;cabal: update cabal files 2022-03-05 13:24:48 -10:00
Simon Michael
35c1c9b6a2 pkg: progress towards supporting GHC 9.2 and newer libs (#1774)
hledger-lib builds, hledger's deps don't (shakespeare).
2021-12-06 12:32:50 -10:00
Simon Michael
ce3ec28e3d ;cabal: update cabal files 2021-12-01 22:16:37 -10:00
Simon Michael
0c4b820111 ;cabal: update cabal files 2021-12-01 17:16:28 -10:00
Stephen Morgan
c6beb581a1 pkg: Use maximumBound instead of maximumDef to avoid deprecation
warnings in safe-0.3.18.
2021-11-14 21:49:58 -10:00
Stephen Morgan
ff0132df28 dev: Use realLength from doclayout instead of strWidth and textWidth. (#895)
This gives us more accurate string length calculations. In particular,
it handles emoji and other scripts properly.
2021-11-11 18:29:50 -10:00
Stephen Morgan
1bc04685b7 pkg: Drop base-compat-batteries dependency.
Our supported stackage versions are now new enough that we don't need
any of the compatibility features anymore.
2021-10-31 07:56:07 -10:00
Simon Michael
7af2e79465 ;cabal: update cabal files 2021-10-03 22:56:02 -10:00
Simon Michael
b857307f64 ;cabal: update cabal files 2021-09-24 12:22:15 -10:00
Simon Michael
1b020e004b ;cabal: update cabal files 2021-09-21 15:34:23 -10:00
Stephen Morgan
315e92c08b pkg!: Break functions related to balancing out into a separate module,
Hledger.Data.Balancing.

Both Hledger.Data.Transaction and Hledger.Data.Journal are massive
module with many things in them. Placing the balancing functions, which
are conceptually related, into a separate module helps keep things more
modular.

It also reduces the risk of import cycles, as right now balancing
functions cannot depend on any functions defined outside of
Hledger.Data.Transaction or Hledger.Data.Journal, respectively, if those
modules require basic transaction or journal functions.
2021-09-19 17:10:38 -10:00
Stephen Morgan
1c402edb06 pkg!: Remove Hledger.Data.Commodity module.
There are no modules which depend on Hledger.Data.Commodity which don't
also depend on Hledger.Data.Amount. Though Hledger.Data.Amount is a very
large module and might be broken up, Hledger.Data.Commodity only defines
three very small functions which are used, and so can be combined with
little cost.
2021-08-30 15:57:33 -10:00
Stephen Morgan
a0f9d7560f pkg!: Remove Hledger.Utils.Color module.
This module was only used in one place in Hledger.Data.Amount. The code
has been moved directly into Hledger.Utils.
2021-08-30 15:57:33 -10:00
Stephen Morgan
f1994d5aa8 pkg!: Remove Hledger.Utils.Tree module.
This very small module was only used in Hledger.Data.Account, so the
code was moved into that module instead.
2021-08-30 15:57:33 -10:00
Stephen Morgan
1ed06f3bc8 pkg!: Remove Hledger.Utils.UTF8IOCompat module.
This module does nothing beyond define error' and usageError, which have
been moved to Hledger.Utils.
2021-08-30 15:57:33 -10:00
Stephen Morgan
c784da3d0c dev: lens: Create a Template Haskell helper for generating classy lenses
for hledger options.

This works for BalancingOpts, InputOpts, ReportOpts, ReportSpec, and CliOpts.
2021-08-28 19:12:04 -10:00
Stephen Morgan
4576f8effd pkg!: Migrate the last of old-time over to time, changing ClockTime to
POSIXTime.

This eliminates old-time, which has been deprecated for a while, from
our dependencies.

This introduces a slight incompatibility, as a small number of functions
now take/return POSIXTime instead of ClockTime. Generally you will be
using the current time, in which case you should use getPOSIXTime from
Data.Time.Clock.POSIX instead of getClockTime.

utcTimeToClockTime has been removed, as it is now equivalent to
utcTimeToPOSIXSeconds from Data.Time.Clock.POSIX.
2021-08-19 17:47:19 -10:00
Arjen Langebaerd
3426030a91 feat: added commodity style commandline option 2021-08-17 22:05:29 -10:00
Simon Michael
6afc5ce6b2 ;cabal: update cabal files 2021-08-03 21:05:29 -10:00
Simon Michael
95de5a878a ;cabal: update cabal files 2021-08-03 08:00:22 -10:00
Stephen Morgan
4e9db4e377 dev: lens: Introduce lenses for ReportOpts and ReportSpec. 2021-07-30 09:27:39 -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
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
Simon Michael
26bc5e6df3 ;update cabal files 2021-06-28 22:38:12 -10:00
Simon Michael
b681cde62d ;update cabal files 2021-06-03 14:08:47 -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
Simon Michael
eb2da22f63 ;update cabal files 2021-04-04 08:03:57 -10:00
Simon Michael
d0940bf8ce ;update cabal files 2021-03-29 08:19:54 -07:00