This was not a sensible type to have an Ord instance.
F2XLL7XWGUV4TJD4X2MJADYAQHCSB4HD2TPPEYVHEKHOQIOOFISAC
NEDDHXUK3GNFMOFO3KLU7NRIHCTYNWBT3D6HTKZAOXFDE6HMDZ6AC
75N3UJ4JK56KXF56GASGPAWLFYGJDETVJNYTF4KXFCQM767JUU5AC
WO2MINIF4TXOHWSE7JWXRZYN64XRVLYIRFMF4SMPSOXKA2V77KMQC
LAROLAYUGJ4Q5AEFV5EJMIA2ZKBNCBWHHHPCJ3CKCNIUIYUKRFVQC
TLQ72DSJD7GGPWN6HGBHAVPBRQFKEQ6KSK43U7JWWID4ZWAF47JAC
IZEVQF627FA7VV25KJAWYWGGC35LZUUBBQRPN5ZAINTQLPEDRTEAC
7HPY3QPFPN35PSPUBVNW2GTFB3CBQZBST4J2BAVJ7QMXLIUN52JAC
instance Ord Bid where
(<=) b1 b2 =
costRatio b1 <= costRatio b2
where
secs bid = toRational $ bid ^. bidSeconds
btc bid = toRational $ bid ^. bidAmount
costRatio bid = secs bid / btc bid
bidOrder :: Bid -> Bid -> Ordering
bidOrder =
comparing costRatio
where
secs bid = toRational $ bid ^. bidSeconds
btc bid = toRational $ bid ^. bidAmount
costRatio bid = secs bid / btc bid