[Haskell-cafe] Progress indications

Ketil Malde ketil+haskell at ii.uib.no
Fri Nov 30 02:52:50 EST 2007

Andrew Coppin <andrewcoppin at btinternet.com> 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. 

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list