ioToST
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Aug 24 23:36:18 EDT 2009
Hello Samuel,
Tuesday, August 25, 2009, 4:36:31 AM, you wrote:
> Shouldn't Control.Monad.ST export ioToST :: IO a -> ST RealWorld a, as
> defined in GHC.IO?
no. ST is a subset of IO monad with a limited set of operators
guaranteeing referential transparence, as a result runST is a pure
operation. if you provide ability to run in ST monad arbitrary
operations, this guarantee will break. there are pother way to do the
same - use IO operations and unsafePerformIO
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Libraries
mailing list