| Amount's default show instance hid important details, making eg test
failures hard to understand. Showing full detail required increasing
the debug level which was inconvenient.
Now it has a single show instance which shows more information, is
fairly compact, and is pretty-printable with pretty-show.
Ellipses (..) in the output indicate where fields are
- not shown in full detail, and/or
- shown in pseudo syntax (double quoted) to work with pretty-show.
ghci> usd 1
OLD:
Amount {acommodity="$", aquantity=1.00, ..}
NEW:
Amount {acommodity = "$", aquantity = 1.00, aprice = NoPrice, astyle = AmountStyle "L False 2 Just '.' Nothing..", amultiplier = False}
MixedAmount's show instance is unchanged, but showMixedAmountDebug
is affected by this change:
ghci> putStrLn $ showMixedAmountDebug $ Mixed [usd 1]
OLD:
Mixed [Amount {acommodity="$", aquantity=1.00, aprice=, astyle=AmountStyle {ascommodityside = L, ascommodityspaced = False, asprecision = 2, asdecimalpoint = Just '.', asdigitgroups = Nothing}}]
NEW:
Mixed [Amount {acommodity="$", aquantity=1.00, aprice=, astyle=AmountStyle "L False 2 Just '.' Nothing.."}] | ||
|---|---|---|
| .. | ||
| Hledger | ||
| other/ledger-parse | ||
| tests | ||
| Text | ||
| .ghci | ||
| CHANGES | ||
| hledger_csv.5 | ||
| hledger_csv.info | ||
| hledger_csv.m4.md | ||
| hledger_csv.txt | ||
| hledger_journal_directives.m4.md | ||
| hledger_journal.5 | ||
| hledger_journal.info | ||
| hledger_journal.m4.md | ||
| hledger_journal.txt | ||
| hledger_timeclock.5 | ||
| hledger_timeclock.info | ||
| hledger_timeclock.m4.md | ||
| hledger_timeclock.txt | ||
| hledger_timedot.5 | ||
| hledger_timedot.info | ||
| hledger_timedot.m4.md | ||
| hledger_timedot.txt | ||
| hledger-lib.cabal | ||
| Hledger.hs | ||
| LICENSE | ||
| package.yaml | ||
| README | ||
| Setup.hs | ||
A reusable library containing hledger's core functionality. This is used by most hledger* packages for common data parsing, command line option handling, reporting etc.