Simon Michael
2e77586d1b
imp: journal: ignore value directives (ledger compat)
2022-12-22 00:38:51 -10:00
Simon Michael
fb7134c9a0
imp: journal: ignore tag subdirectives (ledger compat)
2022-12-22 00:34:33 -10:00
Simon Michael
c58b9e6ac9
imp: journal: accept apply year as another synonym for Y (ledger compat)
2022-12-22 00:27:35 -10:00
Simon Michael
2357a7a750
dev: journal: ignore CLI flags in journal
2022-12-21 23:40:43 -10:00
Simon Michael
abd104ccee
imp: journal: ignore more ledger directives (ledger compat)
...
apply fixed, apply tag, assert, bucket, A, capture, check, define, expr
And reorder the directivep parsers.
2022-12-21 23:04:58 -10:00
Simon Michael
e09ab0936a
imp: journal: accept @ as a prefix of directives (ledger compat)
2022-12-21 22:56:32 -10:00
Simon Michael
95d7679f6d
imp: journal: accept year as a synonym for Y (ledger compat)
2022-12-21 22:27:08 -10:00
Simon Michael
826a7cfb2a
imp: journal: ignore payee subdirectives
2022-12-21 22:09:15 -10:00
Simon Michael
bf6a2a7ccf
imp: journal: ignore commodity subdirectives other than format
2022-12-21 22:08:54 -10:00
Simon Michael
b73916323a
;dev: note transaction price deprecation in haddock
2022-12-10 19:01:48 -10:00
Simon Michael
ace185f7d2
;doc: update old manual links
2022-12-10 18:56:47 -10:00
Simon Michael
b50d60cfea
;doc: csv, timeclock, timedot: clarify comment lines ( #1953 )
2022-12-06 10:38:50 -10:00
Simon Michael
f3b0a1f513
;doc: update manuals
2022-12-01 12:24:23 -08:00
Simon Michael
8da21f1195
;cabal: update cabal files
2022-12-01 12:23:10 -08:00
Simon Michael
740ea50e4c
;pkg: bump version to 1.28.99
2022-12-01 12:23:10 -08:00
Simon Michael
cbbfb82474
doc: 1.28 changelog headings
2022-12-01 12:21:09 -08:00
Simon Michael
fa8f6ae302
lib: Debug: breakpoint doesn't support windows yet, drop for now
2022-12-01 12:20:29 -08:00
Simon Michael
d76e47b586
;doc: update changelogs
2022-11-30 17:13:09 -05:00
Felix Yan
66b51472f2
Allow megaparsec 9.3
...
Builds fine and all tests pass.
2022-11-30 05:12:04 -05:00
Simon Michael
5283c280bf
;cabal: update cabal files
2022-11-26 00:13:02 -05:00
Simon Michael
3a6955d3e2
dev: add stack9.4.yaml for building with latest nightly/ghc 9.4.3
2022-11-25 23:45:17 -05:00
Simon Michael
4399076a0a
;doc: lib: update BalanceAssertion doc
2022-11-10 19:01:53 -10:00
Simon Michael
6d2687e67d
fix: debug logging: fix non-logging ptrace*IO, dbg*IO
2022-11-07 14:50:13 -10:00
Simon Michael
b0966adc93
dev: debug logging: ".log" suffix instead of ",logging"; improve docs
2022-11-06 09:01:12 -10:00
Simon Michael
78771e900b
dev: lib: support debug logging to file in a few more places for hledger-ui
2022-11-06 09:01:12 -10:00
Simon Michael
9a8a8a75a2
imp: ui: start on balance sheet screen: better initial screen stack
2022-11-06 07:59:45 -10:00
Simon Michael
b079bbdb4e
dev: lib: Hledger.Utils cleanup
2022-11-04 22:19:24 -10:00
Simon Michael
79047ccc43
dev: lib: consolidate some utils in Hledger.Utils.IO
2022-11-04 19:14:36 -10:00
Simon Michael
fc8aa5253a
dev: lib: Hledger.Utils.Print -> Hledger.Utils.IO
2022-11-04 18:39:31 -10:00
Simon Michael
6fcd85aac3
dev: lib: Hledger.Utils cleanup, explicit exports
2022-11-04 12:59:10 -10:00
Simon Michael
80249c3e8a
dev: lib: Utils cleanups
2022-11-04 09:51:25 -10:00
Simon Michael
5bc977442a
dev: lib: remove NOINLINE pragmas HLS doesn't complain about
2022-11-03 17:58:32 -10:00
Simon Michael
0608a76243
dev: lib: extract progArgs, minimise unsafe IO
...
It is exported from the increasingly-inaccurately-named
Hledger.Utils.Print for now.
2022-11-03 17:58:13 -10:00
Simon Michael
80eb461063
;doc: update manuals
2022-11-03 16:07:55 -10:00
Simon Michael
988c164ec8
imp: debug logging improvements; hledger-ui logs to hledger-ui.log only
...
Hledger.Utils.Debug's "trace or log" functions are now controlled as
follows: to enable logging, append ",logging" to the program name at
startup (using withProgName). This also works when running in GHCI.
And they log to PROGNAME.log, not debug.log.
All (hopefully) debug logging in the hledger packages is now "trace or
log" capable.
This means that hledger-ui should now log all debug output to
./hledger-ui.log, with none of it appearing on the console.
2022-11-03 16:07:54 -10:00
Simon Michael
3d26fc30eb
;doc: update changelogs
2022-10-31 13:18:36 -10:00
Simon Michael
603fae70c0
dev: lib: clean up/simplify debug helpers
2022-10-31 11:26:11 -10:00
Simon Michael
fbd2ed5a44
;cabal: update cabal files
2022-10-29 13:04:58 -10:00
Simon Michael
ddb3ea777e
imp: lib: move hledger-specific things out of Hledger.Utils.Debug
...
Moved from Hledger.Utils.Debug to Hledger.Utils.Parse:
traceParse
traceParseAt
dbgparse
2022-10-29 13:04:47 -10:00
Simon Michael
fd82fa48c9
imp: lib: separate Hledger.Utils.Print
...
Moved from Hledger.Utils.Debug to Hledger.Utils.Print:
pshow
pshow'
pprint
pprint'
colorOption
useColorOnStdout
useColorOnStderr
outputFileOption
hasOutputFile
2022-10-29 12:39:46 -10:00
Simon Michael
7fd25809e8
dev: fix customErrorBundlePretty import warnings
2022-10-07 07:43:28 -10:00
Simon Michael
a759a6e02e
dev: lib: note changed cost handling in amount arithmetic
2022-10-07 06:34:34 -10:00
Simon Michael
3a4f23df95
imp: lib: Hledger.Data.Amount: showMixedAmountOneLine now shows costs
2022-10-07 06:34:34 -10:00
Simon Michael
de5a97600c
imp: lib: Hledger.Read.Common: rename/add amount parsing helpers
...
removed:
amountp'
mamountp'
added:
parseamount
parseamount'
parsemixedamount
parsemixedamount'
2022-10-07 06:34:34 -10:00
Simon Michael
82a503cbf5
imp: lib: Hledger.Utils.Parse: export customErrorBundlePretty
...
for pretty-printing hledger parse errors.
2022-10-07 06:34:34 -10:00
Simon Michael
33dba1945d
dev: lib: Text.Megaparsec.Custom notes
2022-10-07 06:34:34 -10:00
Simon Michael
01387548e7
feat: csv: intra-day-reversed compensates when days' txns are reversed
...
As in eg vanguard CSV.
2022-10-06 22:21:55 -10:00
Simon Michael
15b2e7d586
fix: csv: ignore extra whitespace in account rule when detecting virtual postings
...
Reported by CruxOfTheB in chat.
2022-10-03 07:50:23 -10:00
Simon Michael
928cc6d615
;doc: update manuals
2022-10-01 16:09:26 -10:00
Simon Michael
3b24d9465b
imp: csv: new timezone rule; convert zoned date-times to local dates ( #1936 )
...
Previously, CSV date-times with a different time zone from yours
(with or without explicit timezones in the CSV) could give off-by-one
dates, because the CSV timezone was ignored.
Now,
1. you can use the `timezone` rule to indicate which other
timezone a CSV is implicitly using
2. CSV date-times with a timezone - whether declared by rule or
parsed with %Z - are localised to the system time zone
(or another set with the TZ environment variable).
2022-10-01 14:50:35 -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
a3c2e2c1ba
doc: changelogs
2022-09-18 10:02:25 -10:00
Simon Michael
a2be9a0bce
;doc: update changelogs
2022-09-18 08:28:03 -10:00
Simon Michael
0a501941ee
dev: lib: ReportTypes: hlint fix
2022-09-14 16:57:54 -10:00
Simon Michael
5c14ed2ec9
dev: lib: clarify dlogAt's doc
2022-09-10 12:44:21 -10:00
Simon Michael
bc810063a5
dev: lib: improve ReportSpec doc
2022-09-07 09:53:11 -10:00
Simon Michael
427005037e
cabal: update cabal files
2022-09-01 18:37:57 -07:00
Simon Michael
e5bb4f0b66
;pkg: bump version to 1.27.99
2022-09-01 18:37:40 -07:00
Simon Michael
38ce19847b
doc: update changelogs
2022-09-01 18:36:39 -07:00
Simon Michael
7631d0efa0
;doc: update manuals
2022-09-01 18:36:34 -07:00
Simon Michael
651d584bb0
;doc: update changelogs
2022-09-01 15:48:46 -07:00
Simon Michael
6d45630014
dev: lib: fix recently broken doctest
2022-08-29 11:15:35 +01:00
Simon Michael
79792b3368
cabal: update cabal files
2022-08-29 11:15:35 +01:00
Simon Michael
ab01c7c2a2
lib: re-enable doctests with ghc 8.10, to improve CI test
2022-08-29 11:09:16 +01:00
Simon Michael
b46cb8a7f7
cabal: update cabal files
2022-08-23 12:16:25 +01:00
Simon Michael
bfb632dd8e
dev: lib: Hledger.Data.Amount: drop amount, use nullamt always
2022-08-23 12:16:15 +01:00
Simon Michael
c80c72d7cd
dev: lib, cli, bin: enable/fix name shadowing warnings
...
And a few other cleanups.
2022-08-23 12:16:15 +01:00
Simon Michael
e5578e5c4e
;cabal: update cabal files
2022-08-23 02:02:19 +01:00
Simon Michael
9584ebb439
imp: lib: Hledger.Utils.Debug: re-export Debug.Breakpoint
...
And add breakpoint as a dependency and enable its GHC plugin in all
the hledger packages, so that breakpoint's helpers can be used easily.
2022-08-23 02:02:19 +01:00
Simon Michael
6a4680d561
imp: pkg: drop support for GHC 8.6 and 8.8
...
Slightly motivated by a desire to depend on the new breakpoint
library, which requires GHC 8.10+. With GHC 9.0 in Debian,
it seems time to drop these.
2022-08-23 02:02:19 +01:00
Simon Michael
b7b09f991a
imp: lib: Hledger.Utils.Debug: fix debug logging to file
...
dlog has been replaced by more reliable functions for debug-logging
to a file, useful for debugging TUI apps like hledger-ui:
dlogTrace
dlogTraceAt
dlogAt
dlog0
dlog1
dlog2
dlog3
dlog4
dlog5
dlog6
dlog7
dlog8
dlog9
Monochrome pprint' and pshow' have been added.
New dependency: deepseq
2022-08-23 00:50:51 +01:00
Simon Michael
423f3bd155
;doc: update manuals
2022-08-22 07:59:02 +01:00
Stephen Morgan
c966a0f413
fix!: cbr: Remove old account type query code. ( #1921 )
...
This replaces the old journal*AccountQuery with the new Type query. This
enables uniform treatment of account type, and fixes a subtle bug
(#1921 ).
Note that cbcsubreportquery no longer takes Journal as an argument.
2022-08-21 08:27:51 +01:00
Simon Michael
b32b130045
dev: lib: fix a failing doctest
2022-08-18 05:08:10 +01:00
Simon Michael
101e2f7426
imp: add a missing space after colon in some debug output
2022-08-16 09:13:30 +01:00
Simon Michael
3003a18c94
dev: lib: hlint improvements
2022-08-16 09:13:30 +01:00
Simon Michael
a3096d0549
dev: journalFilePath, include: show (unknown) instead of nothing
...
Probably not user-visible, but might improve debug logging slightly.
2022-08-16 09:13:30 +01:00
Simon Michael
1f08a8a94e
fix: fix multi-file account display order; improve file read logging ( #1909 )
2022-08-16 09:13:30 +01:00
Simon Michael
07e3dca735
imp: at --debug 5, log account declarations info while parsing ( #1909 )
2022-08-16 09:13:30 +01:00
Simon Michael
3d6e363461
lib: save account directive positions, for troubleshooting ( #1909 )
2022-08-16 09:13:30 +01:00
Simon Michael
b46aa1330f
fix: don't reverse account display order with include files ( #1909 )
2022-08-05 13:44:56 +01:00
Simon Michael
09d66c5fc1
fix: account display order is now tracked across all files ( fix #1909 )
2022-08-04 19:05:52 +01:00
Simon Michael
7063eba13c
fix: bal: budget goal amounts now respect -c styles ( fixes #1907 )
2022-08-03 17:43:04 +01:00
Simon Michael
229fe6ac58
fix: areg, ui: show transactions normally with a type: query ( #1905 )
...
accountTransactionsReport was not account types-aware.
There might be more of these lurking.
2022-08-03 10:38:42 +01:00
Simon Michael
910b37abf8
fix: check: recentassertions: drop the cleared requirement ( #1899 )
...
It was causing trouble and complicating things too much.
I wanted it as another signal of being "caught up", but YAGNI.
2022-08-03 09:53:55 +01:00
Simon Michael
1ed8c20978
feat: check recentassertions disallows assertion lag > 7 days
...
hledger check recentassertions (or flycheck-hledger if you enable this
check) will complain if any balance-asserted account does not have a
balance assertion within 7 days before its latest posting. This aims
to prevent the situation where you are regularly updating your
journal, but forgetting to check your balances against the real world,
eventually requiring you to dig back through months of data to find
the error.
2022-08-01 06:53:04 +01:00
Simon Michael
217cfbd389
imp: errors: assertions: improve sample hledger command
2022-07-31 08:26:30 +01:00
Simon Michael
442ef9361c
feat: api: quoteForCommandLine: some very shady CLI escaping
2022-07-31 08:26:30 +01:00
Simon Michael
d860d6d2fc
api: Hledger.Data.Errors: export makeBalanceAssertionErrorExcerpt
2022-07-29 09:01:34 +01:00
Simon Michael
f135001b87
;dev: improve followingcommentp' doc
2022-07-28 09:14:13 +01:00
Simon Michael
47ae346b21
imp: errors: assertions: improve wording, actual -> calculated
2022-07-23 02:35:52 +01:00
Simon Michael
147856e3bb
imp: errors: timeclock, csv error improvements
2022-07-23 02:35:52 +01:00
Stephen Morgan
c54fb4d514
imp: cost: Allow matching equity conversion equity postings to
...
transaction prices.
When given --infer-costs, hledger will now separately infer transaction
prices for different prices. Given a pair of adjacent conversion
postings, hledger will check if there is a single posting with a
transaction price which matches both the amounts. If so, it associates
those conversion postings to that priced post.
If it can't find any transaction price postings which match, it will
find the first non-transaction price post which matches one of the two
amounts, and will add a transaction price to that, and associate them.
2022-07-15 12:32:38 +01:00
Stephen Morgan
07d1b01287
imp: cost: Allow inferring cost from conversion equity postings with --infer-costs.
...
When given --infer-equity, hledger will change transaction prices to balancing equity postings. This introduces the inverse operation, --infer-costs, which will match balancing equity postings and transform them into a transaction price, allowing --cost to work properly with them. This is only a partial inverse as it needs to use some heuristics to match the postings which will not work in complicated cases.
Specifically, when hledger finds exactly two conversion postings in a transaction (by default, subaccounts of equity:conversion or equity:trad(e|ing)), it will find the first posting in the transaction whose amount is negative one of the conversion posting amounts, and inserts the corresponding transaction price.
2022-07-15 12:32:38 +01:00
Simon Michael
78d5939c19
dev: errors: improve timeclock errors
2022-07-14 19:24:46 +01:00
Simon Michael
32c7f6300b
imp: errors: improve, test timeclock errors
2022-07-14 11:57:32 +01:00
Simon Michael
0ecc1ed79b
dev: Uniqueleafnames.hs: fix haddock failure
2022-07-13 19:10:28 +01:00
Simon Michael
7d8fbe2dc0
dev: errors: update doctests
2022-07-13 19:00:00 +01:00
Simon Michael
5a343bf090
imp: errors: assertions: improve layout
2022-07-13 17:56:17 +01:00
Simon Michael
e172e5dd56
imp: errors: uniqueleafnames: more precise error message
2022-07-13 04:02:14 +01:00