> What's the difference between unIO and unsafePerformIO? And why is the
> former "safe"? (I would like to apply the same questions to 
> unsafeIOToST and ioToST)

unIO is an internal function used in GHC's libraries, it is not for
external consumption.  GHC represents the IO type using newtype, and the
unIO function just removes the newtype constructor.  It doesn't actually
"perform" the IO action like unsafePerformIO does.

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to