mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-10 05:39:31 +03:00
cacheLedger cleanup
This commit is contained in:
parent
fc928ba278
commit
f7b2e62bcb
@ -33,10 +33,9 @@ instance Show Ledger where
|
||||
cacheLedger :: [String] -> RawLedger -> Ledger
|
||||
cacheLedger apats l = Ledger{rawledgertext="",rawledger=l,accountnametree=ant,accountmap=acctmap}
|
||||
where
|
||||
(ant,txnsof,_,inclbalof) = groupTransactions $ filtertxns apats $ rawLedgerTransactions l
|
||||
acctmap = Map.fromList [(a, mkacct a) | a <- flatten ant]
|
||||
mkacct a = Account a (txnsof a) (inclbalof a)
|
||||
ts = filtertxns apats $ rawLedgerTransactions l
|
||||
(ant,txnsof,_,inclbalof) = groupTransactions ts
|
||||
where mkacct a = Account a (txnsof a) (inclbalof a)
|
||||
|
||||
-- | Given a list of transactions, return an account name tree and three
|
||||
-- query functions that fetch transactions, balance, and
|
||||
|
Loading…
Reference in New Issue
Block a user