Points are not totally ordered, and so the Ord instance is misleading (and has been the cause of various bugs). For the case where we store Points in a Map or Set, we should introduce something like
newtype WithArtificialOrdering a = WithArtificialOrdering {
unArtificialOrdering :: a
}
instance Ord (WithArtificialOrdering (Point blk)) where
..
Point
s are not totally ordered, and so theOrd
instance is misleading (and has been the cause of various bugs). For the case where we storePoint
s in aMap
orSet
, we should introduce something like