samesymbol cleanup

This commit is contained in:
Simon Michael 2008-11-08 22:49:14 +00:00
parent 7819abd80f
commit 8939c1f7b7

View File

@ -102,8 +102,7 @@ canonicaliseAmounts l@(RawLedger ms ps es f) = RawLedger ms ps (map fixEntryAmou
commoditiesmap :: Map.Map String [Commodity]
commoditiesmap = Map.fromList [(symbol $ head cs,cs) |
cs <- groupBy samesymbol $ rawLedgerCommodities l]
samesymbol :: Commodity -> Commodity -> Bool
samesymbol (Commodity{symbol=s1}) (Commodity{symbol=s2}) = s1==s2
samesymbol c1 c2 = symbol c1 == symbol c2
rawLedgerAmounts :: RawLedger -> [MixedAmount]
rawLedgerAmounts = map amount . rawLedgerTransactions