hledger/hledger-lib/Hledger
Simon Michael e6181efe95 lib: more compact show instance for Amounts (#812)
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.."}]
2018-08-15 11:18:55 +01:00
..
Data lib: more compact show instance for Amounts (#812) 2018-08-15 11:18:55 +01:00
Read lib: more informative test failure message (#812) 2018-08-14 16:05:06 +01:00
Reports remove some unneeded CPP pragmas 2018-08-02 08:25:49 +01:00
Utils lib: move assertParseEqual' (#812) 2018-08-14 16:05:06 +01:00
Data.hs lib: AutoTransaction.hs -> TransactionModifier.hs, PeriodicTransaction.hs 2018-07-30 20:22:39 +01:00
Query.hs prices: allow filtering by query, clarify docs 2018-07-15 09:21:10 +01:00
Read.hs lib: Fix compile errors in tests 2018-08-14 16:05:06 +01:00
Reports.hs budget: use a new first-class BudgetReport for --budget 2018-04-23 18:52:28 -07:00
Utils.hs lib: make applyN more robust (#852) 2018-07-30 11:04:33 +01:00