rename showLedgerAccounts to showLedgerAccountBalances
This commit is contained in:
		
							parent
							
								
									d507559056
								
							
						
					
					
						commit
						cf194e6b60
					
				| @ -18,7 +18,7 @@ ledgerAccountTree, | ||||
| addDataToAccountNameTree, | ||||
| printentries, | ||||
| printregister, | ||||
| showLedgerAccounts, | ||||
| showLedgerAccountBalances, | ||||
| showAccountTree, | ||||
| isBoringInnerAccount, | ||||
| isBoringInnerAccountName, | ||||
| @ -218,8 +218,8 @@ e | ||||
|   g | ||||
| @ | ||||
| -} | ||||
| showLedgerAccounts :: Ledger -> Int -> String | ||||
| showLedgerAccounts l maxdepth =  | ||||
| showLedgerAccountBalances :: Ledger -> Int -> String | ||||
| showLedgerAccountBalances l maxdepth =  | ||||
|     concatMap  | ||||
|     (showAccountTree l)  | ||||
|     (branches $ ledgerAccountTree l maxdepth) | ||||
|  | ||||
							
								
								
									
										2
									
								
								Tests.hs
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Tests.hs
									
									
									
									
									
								
							| @ -378,5 +378,5 @@ test_cacheLedger = | ||||
|     assertEqual' 15 (length $ Map.keys $ accounts $ cacheLedger ledger7 nullpats) | ||||
| 
 | ||||
| test_showLedgerAccounts =  | ||||
|     assertEqual' 4 (length $ lines $ showLedgerAccounts l7 1) | ||||
|     assertEqual' 4 (length $ lines $ showLedgerAccountBalances l7 1) | ||||
| 
 | ||||
|  | ||||
| @ -19,7 +19,7 @@ This module includes some helpers for working with your ledger in ghci. Examples | ||||
| > Ledger with 696 entries, 132 accounts | ||||
| > *Main> putStr $ drawTree $ treemap show $ accountnametree l | ||||
| > ... | ||||
| > *Main> putStr $ showLedgerAccounts l 1 | ||||
| > *Main> putStr $ showLedgerAccountBalances l 1 | ||||
| > ... | ||||
| > *Main> printregister l | ||||
| > ... | ||||
| @ -73,7 +73,7 @@ balance :: Command | ||||
| balance opts pats = parseLedgerAndDo opts pats printbalance | ||||
|     where | ||||
|       printbalance :: Ledger -> IO () | ||||
|       printbalance l = putStr $ showLedgerAccounts l depth | ||||
|       printbalance l = putStr $ showLedgerAccountBalances l depth | ||||
|           where  | ||||
|             showsubs = (ShowSubs `elem` opts) | ||||
|             depth = case (pats, showsubs) of | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user