lib: more compact debug output for Accounts
This commit is contained in:
		
							parent
							
								
									b5602fd771
								
							
						
					
					
						commit
						62c822c1e6
					
				| @ -13,6 +13,7 @@ import Data.List | |||||||
| import Data.Maybe | import Data.Maybe | ||||||
| import Data.Ord | import Data.Ord | ||||||
| import qualified Data.Map as M | import qualified Data.Map as M | ||||||
|  | import Data.Text (pack,unpack) | ||||||
| import Safe (headMay, lookupJustDef) | import Safe (headMay, lookupJustDef) | ||||||
| import Test.HUnit | import Test.HUnit | ||||||
| import Text.Printf | import Text.Printf | ||||||
| @ -27,7 +28,7 @@ import Hledger.Utils | |||||||
| -- deriving instance Show Account | -- deriving instance Show Account | ||||||
| instance Show Account where | instance Show Account where | ||||||
|     show Account{..} = printf "Account %s (boring:%s, postings:%d, ebalance:%s, ibalance:%s)" |     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) |                        (if aboring then "y" else "n" :: String) | ||||||
|                        anumpostings |                        anumpostings | ||||||
|                        (showMixedAmount aebalance) |                        (showMixedAmount aebalance) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user