Is there a good reason that STRefit is not or cannot be instantiated by either Ordor Hashabletypeclasses ?.
I have seen arguments against inclusion Ord IORefin the past, and I remember that the reason given was spatial. This reason prompted me to consider Hashable.
My motivation is to use STRefin sets, which can be done directly through Ord, or indirectly, by streamlining its hash.
Edit: I hope to accomplish observable sharing in the monad ST. STRefallows this, but when an imperative algorithm requires a comparison between a set of links, implementing it as a list search is slow (O (n)).
Ideally, I would like to use a set or hash map. In this case, the order in this case does not matter for the stability of the algorithm, so the actual links are not related to the final result of the algorithm.
source
share