samesymbol cleanup
This commit is contained in:
parent
7819abd80f
commit
8939c1f7b7
@ -102,8 +102,7 @@ canonicaliseAmounts l@(RawLedger ms ps es f) = RawLedger ms ps (map fixEntryAmou
|
|||||||
commoditiesmap :: Map.Map String [Commodity]
|
commoditiesmap :: Map.Map String [Commodity]
|
||||||
commoditiesmap = Map.fromList [(symbol $ head cs,cs) |
|
commoditiesmap = Map.fromList [(symbol $ head cs,cs) |
|
||||||
cs <- groupBy samesymbol $ rawLedgerCommodities l]
|
cs <- groupBy samesymbol $ rawLedgerCommodities l]
|
||||||
samesymbol :: Commodity -> Commodity -> Bool
|
samesymbol c1 c2 = symbol c1 == symbol c2
|
||||||
samesymbol (Commodity{symbol=s1}) (Commodity{symbol=s2}) = s1==s2
|
|
||||||
|
|
||||||
rawLedgerAmounts :: RawLedger -> [MixedAmount]
|
rawLedgerAmounts :: RawLedger -> [MixedAmount]
|
||||||
rawLedgerAmounts = map amount . rawLedgerTransactions
|
rawLedgerAmounts = map amount . rawLedgerTransactions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user