[Haskell-cafe] unsafePerformIO: are we safe?

Chaddaï Fouché chaddai.fouche at gmail.com
Wed Sep 26 13:57:34 EDT 2007

2007/9/26, Adrian Hey <ahey at iee.org>:
> Sebastian Sylvan wrote:
> > Rule of thumb: If your name isn't Simon*, you shouldn't use unsafePerformIO.
> If this is so, maybe it's time someone (who may or may not be called
> Simon) gave us a realistic alternative.
There can't be alternatives, unsafeIO throw by the window most
guarantee that Haskell can give you and you have to provide them
yourself (with a proof of this part of your program), but it's
inherent to the nature of the beast, it's what it do !

And you don't need to be called Simon to use it, but you surely need
to be careful with it's use if you want to write safe code (you won't
need it in most case, only in very specific situations and in writing
some new strange libraries).


More information about the Haskell-Cafe mailing list