[Haskell] Re: ST/STRef vs. IO/IORef

Till Mossakowski till at informatik.uni-bremen.de
Fri Aug 5 02:12:36 EDT 2005

Remi Turk wrote:

> In a final attempt to convince someone of I'm not exactly sure
> what, I attached a simple implementation of the ST monad in terms
> of unsafePerformIO + IORef + IOArray.

OK, but you have to reason about this implementation to show that
it is safe (which may be difficult because unsafePerformIO makes
reasoning extremely difficult), while the primitives of ST are
more easily proved to be safe.

Till Mossakowski               Phone +49-421-218-4683
Dept. of Computer Science      Fax +49-421-218-3054
University of Bremen           till at tzi.de
P.O.Box 330440, D-28334 Bremen http://www.tzi.de/~till

More information about the Haskell mailing list