[Haskell-beginners] theStdGen unsafePerformIO
John Smith
voldermort at hotmail.com
Sun Jan 9 18:56:46 CET 2011
On 09/01/2011 19:40, Edward Z. Yang wrote:
> Because unsafePerformIO returns a pure value 'a', GHC only computes it
> once and then reuses it later (it's also why when you do this
> you need to make sure you tell GHC not to inline the computation, which
> will obviously change the semantics.)
theStdGen doesn't have NOINLINE. Is the pragma on unsafeDupablePerformIO sufficient for any caller of unsafePerformIO?
More information about the Beginners
mailing list