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
Simon Michael
ae57e76cb3
;update cabal files
2021-03-12 06:59:30 -08:00
Simon Michael
5573538fdc
;update cabal files
2021-03-10 13:50:50 -08:00
Simon Michael
00beaf1423
;update cabal files
2021-03-10 08:24:59 -08:00
Simon Michael
f7bbb39a77
;regenerate cabal files with the hpack version in current stack
...
To minimise warnings. They got regenerated by a commit for #1471 .
2021-02-18 13:42:40 -08:00
Arnout Engelen
ad2ab3c823
Make sure to round up for the 'to' date
2021-02-17 09:05:13 -08:00
Simon Michael
70bcd0a249
;update cabal files ( #1457 , #1458 )
2021-01-13 10:01:55 -08:00
Stephen Morgan
541c4fc18c
lib,cli: Use Text for CSV values.
2021-01-02 15:08:09 +11:00
Simon Michael
62660577c3
;update cabal files
2020-12-24 10:22:16 -08:00
Simon Michael
df5c755d96
;lib, cli: remove old unused parsec dependency
2020-12-15 08:33:05 -08:00
Simon Michael
9afccde16f
;update cabal files
2020-12-14 12:31:01 -08:00
Simon Michael
5507cb07ef
;update cabal files
2020-11-30 15:19:21 -08:00
Simon Michael
221a6d9001
lib: new more robust price lookup implementation, fixing #1402
2020-11-23 18:08:41 -08:00
Simon Michael
a97daaf322
lib: replace pretty-show with pretty-simple
...
pretty-simple, already used in .ghci, will hopefully give nicer debug
output, including for values which don't have Read-able Show output.
This should mean that we can start removing custom string-like Show
instances that were a workaround for pretty-show.
We are using the latest version (4.0.0.0) to get compact output.
Here's some old pretty-show output:
CsvRules
{ rdirectives = [ ( "skip" , "1" ) ]
, rcsvfieldindexes = [ ( "date" , 1 ) , ( "amount" , 2 ) ]
, rassignments = [ ( "amount" , "%2" ) , ( "date" , "%1" ) ]
, rconditionalblocks = []
}
And the new pretty-simple output:
CsvRules
{ rdirectives=
[ ( "skip", "1" ) ]
, rcsvfieldindexes=
[ ( "date", 1 ), ( "amount", 2 ) ]
, rassignments=
[ ( "amount", "%2" ), ( "date", "%1" ) ]
, rconditionalblocks= []
}
Non-compact pretty-simple output would be:
CsvRules
{ rdirectives=
[
( "skip"
, "1B"
)
]
, rcsvfieldindexes=
[
( "date"
, 1
)
,
( "amount"
, 2
)
]
, rassignments=
[
( "amount"
, "%2"
)
,
( "date"
, "%1"
)
]
, rconditionalblocks=[]
}
Also:
- Account's Show instance no longer converts : to _ in account names
- drop unused pretty-show dependency from hledger, hledger-ui packages
- regenerate hledger-lib with the older hpack that's shipped in stack
2020-11-10 08:06:11 -08:00
Stephen Morgan
a620ab9666
lib: Expand Tabular.AsciiWide to allow multiline cells, either top or bottom aligned.
2020-11-04 14:25:21 +11:00