Xitian9 · GitHub

@Xitian9

@Xitian9

@Xitian9

@Xitian9 Xitian9 changed the title Compare MixedAmounts using their list of Quantities. Compare MixedAmounts substituting 0 for missing Commodities.

May 22, 2021

@Xitian9 Xitian9 changed the title Compare MixedAmounts substituting 0 for missing Commodities. Compare MixedAmounts substituting amount of quantity 0 for missing commodities.

May 22, 2021

@Xitian9

@Xitian9

@Xitian9

Closed

simonmichael

@simonmichael simonmichael changed the title Compare MixedAmounts substituting amount of quantity 0 for missing commodities. more useful sort order for multi-commodity MixedAmounts: treat missing commodities as 0

Jul 1, 2021

@Xitian9

@Xitian9

…ommodities. (simonmichael#1563)
The basic goal of this change is to provide more predictable and
intuitive behaviour when using -S/--sort-amount with multiple
commodities. This is achieved by implementing a custom Ord (and Eq)
instance for MixedAmount rather than relying on the derived ones. As a
consequence, all the ways of representing zero with a MixedAmount ([],
[A 0], [A 0, B 0, ...]) are now Eq-ual (==), whereas before they were
not. We have not been able to find anything broken by this change.

@Xitian9

@simonmichael

@simonmichael

Closed

Read the original on github.com ↗