nominolo/union-find — pull request #1 by Peaker (2012-06-06 16:09:01+00:00)
Title: Added ST module as a copy of IO

I thought about using a MonadRef abstraction but then the unpacking optimizations wouldn't work and it brings in a host of GHC extensions (UndecidableInstances).

If it were possible for MonadRef to have a (forall a. Eq (Ref a)) super-class, then it would be possible to avoid most of these problems, but alas, it is not possible.

So anyway, with ST, I might be able to use this in my type inference algorithm which runs way too deep to do any IO.