diff --git a/Ledger/Ledger.hs b/Ledger/Ledger.hs index bba93e701..5b552a911 100644 --- a/Ledger/Ledger.hs +++ b/Ledger/Ledger.hs @@ -87,11 +87,11 @@ filteredaccountnames l = filter (containsRegex (acctpat l) . accountLeafName) $ -- | Get the named account from a ledger. ledgerAccount :: Ledger -> AccountName -> Account -ledgerAccount l a = (accounts l) ! a +ledgerAccount l a = (accountmap l) ! a -- | Get the named filtered account from a ledger. ledgerFilteredAccount :: Ledger -> AccountName -> Account -ledgerFilteredAccount l a = (filteredaccounts l) ! a +ledgerFilteredAccount l a = (filteredaccountmap l) ! a -- | List a ledger's transactions. -- diff --git a/Ledger/Types.hs b/Ledger/Types.hs index de2a5e387..246a780ce 100644 --- a/Ledger/Types.hs +++ b/Ledger/Types.hs @@ -90,10 +90,10 @@ data Account = Account { data Ledger = Ledger { rawledger :: RawLedger, accountnametree :: Tree AccountName, - accounts :: Map.Map AccountName Account, + accountmap :: Map.Map AccountName Account, lprecision :: Int, -- the preferred display precision acctpat :: Regex, -- the account patterns used to filter this ledger filteredaccountnametree :: Tree AccountName, -- account name tree filtered by acctpat - filteredaccounts :: Map.Map AccountName Account -- accounts filtered by acctpat + filteredaccountmap :: Map.Map AccountName Account -- accounts filtered by acctpat } diff --git a/Tests.hs b/Tests.hs index 244918800..7944cc723 100644 --- a/Tests.hs +++ b/Tests.hs @@ -84,7 +84,7 @@ tests = (accountnames ledger7) ,"cacheLedger" ~: do - assertequal 15 (length $ Map.keys $ accounts $ cacheLedger wildcard rawledger7 ) + assertequal 15 (length $ Map.keys $ accountmap $ cacheLedger wildcard rawledger7 ) ,"showLedgerAccounts" ~: do assertequal 4 (length $ lines $ showLedgerAccountBalances ledger7 1) diff --git a/Utils.hs b/Utils.hs index c70a7c09c..3de05ecea 100644 --- a/Utils.hs +++ b/Utils.hs @@ -55,5 +55,5 @@ myledger = do -- | get a named account from your ledger file myaccount :: AccountName -> IO Account -myaccount a = myledger >>= (return . fromMaybe nullacct . Map.lookup a . accounts) +myaccount a = myledger >>= (return . fromMaybe nullacct . Map.lookup a . accountmap)