[Haskell-cafe] Newbie question: mutually exclusive strict / lazy
bf3 at telenet.be
Sat Feb 9 11:33:21 EST 2008
Consider the function
cond x y z = if x then y else z
I guess we can certainly say cond is strict in x.
But what about y and z?
If x is true, then cond is strict in y
If x is false, then cond is strict in z
So we can't really say cond is lazy nor strict in its second or third argument.
Of course, this is the case for many more functions, but in the case of the if-then-else primitive, does the strictness analyzer make use of this "mutually exclusive strictness" fact?
More information about the Haskell-Cafe