
6 Feb
2008
6 Feb
'08
12:25 p.m.
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