rename showLedgerAccounts to showLedgerAccountBalances

This commit is contained in:
Simon Michael 2008-10-03 07:47:36 +00:00
parent d507559056
commit cf194e6b60
3 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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