hledger/hledger-lib
Simon Michael 58f989715a Replace our stringly Regex with a safer compiled Regexp type
This PR #1330, addressing #1312 (parseQuery is partial) and #1245
(internal server error).

User-visible changes:

- hledger-web now handles malformed regular expressions
  (eg, a query consisting of the single character `?`) gracefully,
  showing a tidy error message instead "internal server error".

API/internal changes:

- The Regex type alias has been replaced by the Regexp ADT, which
  contains both the compiled regular expression (so is guaranteed to
  be usable at runtime) and the original string (so can be serialised,
  printed, compared, etc.) A Regexp also knows whether is it case
  sensitive or case insensitive. The Hledger.Utils.Regex api has changed.

- Typeable and Data instances are no longer derived for hledger's
  data types; they were redundant/no longer needed

- NFData instances are no longer derived for hledger's data types.
  This speeds up a full build by roughly 7%. But it means we can't
  deep-evaluate hledger values, or time hledger code with Criterion.
  https://github.com/simonmichael/hledger/pull/1330#issuecomment-684075129
  has some ideas on this.

- Query no longer has a custom Show instance

- Some internal use of regexps was replaced by text replacement or
  parsers.

- Hledger.Utils.String: quoteIfNeeded now actually escapes quotes in
  strings; dropped escapeQuotes

- Hledger.Utils.Tree: dropped some old utilities

- dropped some obsolete code for the old --display option

Merge branch 'regexp' into master
2020-09-01 10:33:33 -07:00
..
Hledger Replace our stringly Regex with a safer compiled Regexp type 2020-09-01 10:33:33 -07:00
other/ledger-parse lib: restrict imports, avoiding GHCI clashes 2016-11-20 10:27:16 -08:00
test ci: --pedantic is too much for now 2020-03-07 14:53:12 -08:00
Text cli:Fixed NoLine column rendering after previous commit 2020-02-29 12:56:35 -08:00
.ghci tools: .ghci for each package, sets shorter prompt 2016-04-15 16:06:45 -07:00
.version bump to dev version 2020-06-21 10:35:52 -07:00
CHANGES.md ;doc: note mislabelled change 2020-08-08 12:07:26 -07:00
defs.m4 ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_csv.5 ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_csv.info ;regen help, manuals 2020-07-14 10:25:04 -07:00
hledger_csv.m4.md ;doc: clarify csv file extensions and separator inferring 2020-08-21 09:01:23 -07:00
hledger_csv.txt ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_journal.5 ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_journal.info ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_journal.m4.md doc: fix regex in example for regex aliases 2020-07-27 17:20:40 -07:00
hledger_journal.txt ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_timeclock.5 ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_timeclock.info ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timeclock.m4.md ;doc: drop redundant version message from web manuals 2020-01-25 19:33:12 -08:00
hledger_timeclock.txt ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_timedot.5 ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger_timedot.info ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timedot.m4.md ;timedot: update docs 2020-03-01 14:06:29 -08:00
hledger_timedot.txt ;doc: regen manuals 2020-08-01 12:41:54 -07:00
hledger-lib.cabal lib: Remove unnecessary NFData instances. 2020-08-31 15:41:36 +10:00
Hledger.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
LICENSE split off hledger-lib package, containing core types & utils 2010-03-22 01:44:59 +00:00
package.yaml lib: Remove unnecessary NFData instances. 2020-08-31 15:41:36 +10:00
README.md ;doc: more tweaks to package readmes, hackage descriptions 2020-03-22 10:49:02 -07:00
Setup.hs Revert "remove Setup.hs files again, fixing a yesod devel warning" 2014-05-24 13:39:09 -07:00

hledger-lib

A reusable library containing hledger's core functionality. This is used by most hledger* packages so that they support the same common file formats, command line options, reports etc.

See also: the project README and home page.