Hello,

Haskell is non-strict but not necessarily lazy.  So it’s possible that an 
expression is reduced to WHNF although it is not used yet.  Could this “early 
reduction” also happen to outputs of unsafeInterleaveIO actions (which might 
trigger the action too early)?  While I’d expect those outputs to be 
evaluated lazily (reduced as late as possible), I cannot find anything in the 
docs that guarantees this.

In addition, I’d like to know whether unsafeInterleaveIO outputs are 
guaranteed to be evaluated at most once so that the “interleaved action” is 
executed at most once.  Again, I suppose that this is the case while I cannot 
find a guarantee for it.

Best wishes,
Wolfgang
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to