From c07c149378e7b5f3723eec75fa94f79db038818c Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 12 Oct 2008 06:10:32 +0000 Subject: [PATCH] type signatures --- Ledger/Ledger.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ledger/Ledger.hs b/Ledger/Ledger.hs index 6fdff112b..df25499e2 100644 --- a/Ledger/Ledger.hs +++ b/Ledger/Ledger.hs @@ -94,12 +94,15 @@ ledgerFilteredAccount :: Ledger -> AccountName -> Account ledgerFilteredAccount l a = (filteredaccountmap l) ! a -- | List a ledger's accounts, in tree order +accounts :: Ledger -> [Account] accounts l = drop 1 $ flatten $ ledgerAccountTree 9999 l -- | List a ledger's top-level accounts, in tree order +topAccounts :: Ledger -> [Account] topAccounts l = map root $ branches $ ledgerAccountTree 9999 l -- | Accounts in ledger whose leafname matches the pattern, in tree order +accountsMatching :: Regex -> Ledger -> [Account] accountsMatching pat l = filter (containsRegex pat . accountLeafName . aname) $ accounts l -- | List a ledger account's immediate subaccounts