Commit Graph

10655 Commits

Author SHA1 Message Date
Simon Michael
5af224d534 fix: tags: also match accounts declared but not used (#1857)
By default, all account declarations and all transactions are searched;
but when there's a query involving transaction fields,
account declarations unrelated to the matched transactions are not searched.

added:
queryIsCode
queryIsTransactionRelated
2022-04-14 12:28:43 -10:00
Simon Michael
4f26309328 ref: clean up Query definition 2022-04-14 11:56:37 -10:00
Simon Michael
161c911cb4 imp: Hledger.Query: new predicates, haddock cleanups
added:
matchesQuery,
queryIsAccountRelated,
queryIsTransactionOrPostingRelated,
2022-04-14 10:58:31 -10:00
Simon Michael
b82021e0b6 imp: accounts: demote --debug 1 output to a more appropriate 4 2022-04-14 10:58:31 -10:00
Simon Michael
7b4ab1e37a ref: tags test 2022-04-14 10:58:31 -10:00
Simon Michael
7a1d5e66e5 tools: stop ignoring site/ 2022-04-14 10:58:31 -10:00
Stephen Morgan
8cc59df513 fix: Ensure date2 is used for journal valuation if requested. (#1851) 2022-04-14 07:27:17 -10:00
Simon Michael
87052febf2 doc: readme: edit 2022-04-13 04:04:37 -10:00
Simon Michael
baed88f3e7 doc: readme: update funding section 2022-04-13 03:56:39 -10:00
Simon Michael
aa3807e157 ref: journalAccountTypes 2022-04-11 09:18:23 -10:00
Simon Michael
f48ef6db83 doc: wording 2022-04-10 11:02:29 -10:00
Simon Michael
5e735b4faf scripts: bin: exclude non-executable files 2022-04-05 10:05:04 -10:00
Simon Michael
d84f2b4eb8 ci: push: edit 2022-04-05 09:38:49 -10:00
Simon Michael
326a314052 scripts: tweak 2022-04-05 09:31:26 -10:00
Simon Michael
f42998bab7 ci: push: really run for all file changes
so that they get the success status and can then be pushed to master.
2022-04-05 09:24:03 -10:00
Simon Michael
6d02e9ef57 bin: aliases.sh -> bashrc, added fin/bin/gnused/gnudate 2022-04-05 09:19:38 -10:00
Simon Michael
c69f319b3f ci: push: run for all file changes, including small doc fixups
so that they get the success status and can then be pushed to master.
2022-04-04 14:31:44 -10:00
Simon Michael
df8bfde04f doc: --infer-market-prices is bad at guessing valuation commodity 2022-04-04 14:21:23 -10:00
Simon Michael
c185bfef58 doc: assertions: edit 2022-04-04 13:03:48 -10:00
Simon Michael
0231ee1124 fix: examples: invoice: calculate dates accurately on last days of month 2022-04-04 12:48:03 -10:00
Simon Michael
001f3f00a3 doc: clarify how assertions work with multiple files, auto postings 2022-04-04 12:46:42 -10:00
Stephen Morgan
28b52fcca5 fix: bin: Remove old function in hledger-print-location. 2022-03-26 15:35:19 -10:00
Stephen Morgan
1aff74f702 cln: Reduce duplication in test utilities. 2022-03-26 15:35:19 -10:00
Stephen Morgan
8968733630 cln!: Clean up journal parsing.
parseAndFinaliseJournal' has been removed. In the unlikely event you
needed it in your code, you can replace it with:
parseAndFinaliseJournal' parser iopts fp t =>
initialiseAndParseJournal parser iopts fp t
>>= liftEither . journalApplyAliases (aliasesFromOpts iopts)
>>= journalFinalise iopts fp t

Some parsers have been generalised from JournalParser to TextParser.
2022-03-26 15:35:19 -10:00
Simon Michael
e91fb8e0db tools: stack: use stackage lts 2022-03-26 09:38:10 -10:00
Simon Michael
1c3dd50e5b ci: sync push/pull, check both with GHC 8.6 to satisfy master 2022-03-26 09:26:53 -10:00
Simon Michael
8ad7dc41b0 ci: push: cleanup, don't run a second time in master 2022-03-26 09:02:46 -10:00
Simon Michael
59c70d9369 ci: push: cleanup 2022-03-26 08:51:23 -10:00
Simon Michael
e61216ac24 ci: push: also run on pushes to "simon" branch 2022-03-26 08:37:31 -10:00
Simon Michael
a2f6b30fbd cln: silence some warnings/lints 2022-03-26 08:34:21 -10:00
Simon Michael
92b146358f tools: hls: use ghc 9.2 in example hie mac config 2022-03-26 08:27:29 -10:00
Simon Michael
db1818ac4a imp: consistent ghc warnings 2022-03-26 08:27:29 -10:00
Simon Michael
4951ca5aa9 tools: regenerate cabal file with ghcup's stack's hpack to avoid conflicts 2022-03-26 08:27:29 -10:00
Simon Michael
7a781b04e5 fix: ci: restore stack.yaml as a regular file to fix CI
Github actions `hashFiles()` may not like symlinks, see comment in
push.yml.
2022-03-25 20:59:28 -10:00
Simon Michael
5858bb7b6d imp: ghc9.2: fix an incomplete-uni-pattern warning 2022-03-25 20:45:06 -10:00
Simon Michael
3eddd913e3 imp: ghc9.2: silence incomplete-record-updates warnings 2022-03-25 20:36:12 -10:00
Simon Michael
d9ecd1eb9d imp: update to modern warning flags 2022-03-25 20:28:34 -10:00
Simon Michael
b3aff7a394 imp: add: avoid deprecated time function 2022-03-25 20:10:18 -10:00
Simon Michael
6914333526 fix: reverse d60e1464's accidental setting of GHC 9.2 as default
There was some reason it wasn't a symlink before, but let's keep that
and see.
2022-03-25 19:46:02 -10:00
Simon Michael
7092ef9a89 fix: commented test for #1849 2022-03-25 19:42:49 -10:00
Stephen Morgan
bffb6c8c82 ref: smartdate: Improve ergonomics of SmartDate constructors. 2022-03-25 19:10:58 -10:00
Simon Michael
97e57c2cb5 imp: doc: clarify relative dates in periodic rules (#1845) 2022-03-25 16:44:57 -10:00
Simon Michael
9a8fb529f3 imp: add a test clarifying periodic txns with forecast (#1845) 2022-03-25 16:30:35 -10:00
Simon Michael
e5e7468521 stack: 9.2: silence new warnings for now 2022-03-25 16:08:21 -10:00
Simon Michael
d70c547b15 imp: fix Foundation runExceptT import (#1847) 2022-03-25 16:08:16 -10:00
Simon Michael
d60e1464d5 imp: fix MonadIO import (#1847) 2022-03-25 14:49:56 -10:00
Stephen Morgan
31c7c5d1ca fix: Clean up build failures due to redundant imports and duplicate
function.
2022-03-26 11:37:32 +11:00
Stephen Morgan
603b2e9f09 ref: Use ExceptT String IO a instead of IO (Either String a).
This increases composability and avoids some ugly case handling. We
re-export runExceptT in Hledger.Read.

The final return types of the following functions has been changed from
IO (Either String a) to ExceptT String IO a. If this causes a problem,
you can get the old behaviour by calling runExceptT on the output:
readJournal, readJournalFiles, readJournalFile

Or, you can use the easy functions readJournal', readJournalFiles', and
readJournalFile', which assume default options and return in the IO
monad.
2022-03-25 14:23:27 -10:00
Simon Michael
ce169d0543 tools: clarify hie-mac.yaml 2022-03-25 11:50:15 -10:00
Simon Michael
0818c44a6c tools: make buildtimes*: switch to GHC 9.2, add unoptimised variants
On mac m1, 9.2 builds almost 3x faster than 9.0,
and building unoptimised gives another 2x speedup.
2022-03-25 11:49:52 -10:00