Open treeowl opened 1 year ago
@konsumlamm Any comments?
I really want the Eq
instance to actually mean something. I think the original idea, when it was (mistakenly) thought that insertBehind
could be implemented efficiently, was that Eq
would be based on the order elements come out of the queue, and merge
would be nondeterministic. But since insertBehind
was a failure, I think we really want to make Eq
equality of queues-as-maps, with merges considered deterministic. It's fine to require Ord
. Is the instance really useful? Maybe not very, but the current one is nonsense. Let's do this please.
Yes this should close #78.
Make the
Eq
andOrd
instances forPrio
queues compare the queues in fully sorted form—that is, as key-value maps. This seems to be the only way to make these instances make any real kind of sense.Document the "nondeterministic" nature of
Prio
queues.