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, addDataToAccountNameTree,
printentries, printentries,
printregister, printregister,
showLedgerAccounts, showLedgerAccountBalances,
showAccountTree, showAccountTree,
isBoringInnerAccount, isBoringInnerAccount,
isBoringInnerAccountName, isBoringInnerAccountName,
@ -218,8 +218,8 @@ e
g g
@ @
-} -}
showLedgerAccounts :: Ledger -> Int -> String showLedgerAccountBalances :: Ledger -> Int -> String
showLedgerAccounts l maxdepth = showLedgerAccountBalances l maxdepth =
concatMap concatMap
(showAccountTree l) (showAccountTree l)
(branches $ ledgerAccountTree l maxdepth) (branches $ ledgerAccountTree l maxdepth)

View File

@ -378,5 +378,5 @@ test_cacheLedger =
assertEqual' 15 (length $ Map.keys $ accounts $ cacheLedger ledger7 nullpats) assertEqual' 15 (length $ Map.keys $ accounts $ cacheLedger ledger7 nullpats)
test_showLedgerAccounts = 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 > Ledger with 696 entries, 132 accounts
> *Main> putStr $ drawTree $ treemap show $ accountnametree l > *Main> putStr $ drawTree $ treemap show $ accountnametree l
> ... > ...
> *Main> putStr $ showLedgerAccounts l 1 > *Main> putStr $ showLedgerAccountBalances l 1
> ... > ...
> *Main> printregister l > *Main> printregister l
> ... > ...
@ -73,7 +73,7 @@ balance :: Command
balance opts pats = parseLedgerAndDo opts pats printbalance balance opts pats = parseLedgerAndDo opts pats printbalance
where where
printbalance :: Ledger -> IO () printbalance :: Ledger -> IO ()
printbalance l = putStr $ showLedgerAccounts l depth printbalance l = putStr $ showLedgerAccountBalances l depth
where where
showsubs = (ShowSubs `elem` opts) showsubs = (ShowSubs `elem` opts)
depth = case (pats, showsubs) of depth = case (pats, showsubs) of