Re: unsafeInterleaveIO ordering

2003-08-31 Thread Robert Ennals
[snip] If you're using an eager haskell implementation which does some speculative evaluation of things that look cheap and that you might want to evaluate, the answer is probably no. (Because, having decided to do some speculative work in the absence of a demand, it might decide it has

Subject: Re: unsafeInterleaveIO ordering

2003-08-30 Thread Robert Ennals
[resending this mail from a different address as it didn't seem to get through the first time. I apologise if you see multiple copies.] [snip] If you're using an eager haskell implementation which does some speculative evaluation of things that look cheap and that you might want to evaluate,

unsafeInterleaveIO ordering

2003-08-29 Thread Hal Daume
if i say: foo = do putStrLn a unsafeInterleaveIO (putStrLn b putStrLn c) putStrLn d is it guarenteed that nothing will happen between putting b and c? that is, while the place/time at which the (putStrLn b putStrLn c) is unspecified, is it the case that the whole thing will be done at

Re: unsafeInterleaveIO ordering

2003-08-29 Thread Alastair Reid
On Friday 29 August 2003 7:23 pm, Hal Daume wrote: if i say: foo = do putStrLn a unsafeInterleaveIO (putStrLn b putStrLn c) putStrLn d is it guarenteed that nothing will happen between putting b and c? that is, while the place/time at which the (putStrLn b putStrLn c) is

Re: unsafeInterleaveIO ordering

2003-08-29 Thread David Sabel
Hi, if i say: foo = do putStrLn a unsafeInterleaveIO (putStrLn b putStrLn c) putStrLn d is it guarenteed that nothing will happen between putting b and c? that is, while the place/time at which the (putStrLn b putStrLn c) is unspecified, is it the case that the whole thing will be

RE: unsafeInterleaveIO ordering

2003-08-29 Thread Hal Daume
In your example it's more or less guaranteed that putting b and c will never happen, because the result of the combinated IO action isn't demanded. well yes, it was a bad example. i got another answer basically saying that threading could screw it up (i'm not using thread) as could,