[Haskell-cafe] Ord (IORef a)?

John Meacham john at repetae.net
Tue Jun 22 02:52:46 EDT 2004

would it be possible to provide an Ord instance for (IORef a)? For
things like loop detection, one may need to make many IORef comparasions
and being able to use an efficient set would be a really big win.

Since IORefs are created in the IO monad, the actual order can be
arbitrary without breaking referential transparency (as long as it
doesn't change over the lifetime of the IORef.)

John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Haskell-Cafe mailing list