[Haskell-cafe] Mutable arrays
Neil Mitchell
ndmitchell at gmail.com
Wed Feb 6 12:25:18 EST 2008
Hi
> Isn't the compiler already "modified" in a way to deal with the RealWorld
> type that is used in the IO monad? Surely the RealWorld is unique...
No. The monad and the primitive operations ensure it is unique, the IO
monad is abstracted away properly, and it all works neatly so you
can't violate the uniqueness. However, the realWorld thing is not
actually unique, for example unsafeInterleaveIO and unsafePerformIO
violate this.
Thanks
Neil
More information about the Haskell-Cafe
mailing list