hledger/hledger-lib/Hledger/Data
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
..
Account.hs lib: Account, AccountName: hlint 2018-02-15 11:38:34 -08:00
AccountName.hs lib: AccountName: set OverloadedStrings for doctests 2018-08-03 19:05:14 +01:00
Amount.hs lib: more compact show instance for Amounts (#812) 2018-08-15 11:18:55 +01:00
Commodity.hs lib: change some parsers to use takeWhileP 2018-05-22 12:16:46 -07:00
Dates.hs lib: capitalised month names broke some period expressions (fix #852) 2018-07-30 11:08:23 +01:00
Journal.hs lib: comment 2018-08-14 16:05:06 +01:00
Ledger.hs lib: ModifierTransaction -> TransactionModifier; try to clarify a bit 2018-07-30 19:38:21 +01:00
MarketPrice.hs Added a simple 'showMarketPrice' function to show market price directives in a journal-compatible way (#505) 2017-02-03 18:20:00 -08:00
Period.hs bs/bse/cf/is: fix display of abbreviated name for December 2018-01-19 12:45:51 -08:00
PeriodicTransaction.hs lib: AutoTransaction.hs -> TransactionModifier.hs, PeriodicTransaction.hs 2018-07-30 20:22:39 +01:00
Posting.hs silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
RawOptions.hs lib: optserror -> usageError, consolidate with other error functions (#529) 2017-03-29 08:00:51 -07:00
StringFormat.hs switch to base-compat-batteries to fix ghc 7.10 support (#794) 2018-06-04 17:32:42 -07:00
Timeclock.hs lib: textification: descriptions & codes 2016-05-24 19:00:58 -07:00
Transaction.hs lib: ModifierTransaction -> TransactionModifier; try to clarify a bit 2018-07-30 19:38:21 +01:00
TransactionModifier.hs lib,rewrite: simplify transactionModifierToFunction 2018-08-02 08:25:49 +01:00
Types.hs lib: more compact show instance for Amounts (#812) 2018-08-15 11:18:55 +01:00