Andre W B Furtado wrote:
        >Well, it's also possible to interchange data between these two monads by:
        >
        >unsafeIOToST :: IO a -> ST s a
        >stToIO :: ST s a -> IO a
        >
        >Can anyone tell the possible problems related to
        >unsafeIOToST?
        >^^^^^^

        Probably in the same manner as with unsafePerformIO:
        it can break referential transparency.

Indeed,

  unsafePerformIO m = runST (unsafeIOToST m)

so they're just as unsafe as each other.

John Hughes

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to