From 62c822c1e6127f61e3e7da6bbf89deb7432c4321 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 29 Sep 2017 18:50:18 -1000 Subject: [PATCH] lib: more compact debug output for Accounts --- hledger-lib/Hledger/Data/Account.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Data/Account.hs b/hledger-lib/Hledger/Data/Account.hs index 4e9e9e432..64cfbaf0a 100644 --- a/hledger-lib/Hledger/Data/Account.hs +++ b/hledger-lib/Hledger/Data/Account.hs @@ -13,6 +13,7 @@ import Data.List import Data.Maybe import Data.Ord import qualified Data.Map as M +import Data.Text (pack,unpack) import Safe (headMay, lookupJustDef) import Test.HUnit import Text.Printf @@ -27,7 +28,7 @@ import Hledger.Utils -- deriving instance Show Account instance Show Account where show Account{..} = printf "Account %s (boring:%s, postings:%d, ebalance:%s, ibalance:%s)" - aname + (pack $ regexReplace ":" "_" $ unpack aname) -- hide : so pretty-show doesn't break line (if aboring then "y" else "n" :: String) anumpostings (showMixedAmount aebalance)