Adrian Hey <[EMAIL PROTECTED]> writes:

> The only real insanity with the current situation is the loss of
> referential transparency implied by the use of unsafePerformIO,
> which is why various pragma hacks and compiler switches need to be
> used (in order to prevent inappropriate substitutions). What I want
> to do is to make this or something similar "official", so the
> compiler really knows not to do this inappropriate subsitution in
> any event, even if the programmer forgot to use the necessary
> pragmas or compiler flags, or just didn't understand why they are
> needed.

It's not the only problem:
v = unsafePerformIO (newIORef undefined) :: IORef a
You can store an Integer there and try to take out a String.

-- 
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to