Frank A. Christoph <[EMAIL PROTECTED]> wrote:
> Fergus wrote:
> > If you put the call to `unsafePerformIO' in an
> > unsafe primitive such as `req', then when your code is compiled with
> > some optimizing compiler which assumes that functions are referentially
> > transparent the resulting executable may dump core.
> 
> Dump core?

Unlikely in practice, but possible, yes.

> I would expect the compiler to disable any such optimizations
> when it sees an unsafePerformIO.

But it might not see the `unsafePerformIO' at the time it was performing
the optimization in question; it might just see a couple of calls to `req'.

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]        |     -- the last words of T. S. Garp.


Reply via email to