
30 Nov
2007
30 Nov
'07
2:52 a.m.
Andrew Coppin
(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