Andrew Coppin <[EMAIL PROTECTED]> writes:

> (BTW, what's the difference between unsafePerformIO and unsafeInterleaveIO?)

 Prelude> :m + System.IO.Unsafe
 Prelude System.IO.Unsafe> :t unsafePerformIO
 unsafePerformIO :: IO a -> a
 Prelude System.IO.Unsafe> :t unsafeInterleaveIO
 unsafeInterleaveIO :: IO a -> IO a

The former lets you cheat by pretending an IO action is a pure
function, the latter, which really should be called
'notQuiteAsUnsafeInterleaveIO', just makes a strict IO action lazier,
deferring it to when the result is demanded. 

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to