Serge,
How do you think, is the program (1) equivalent to (2) in the meaning of Haskell-98 ?Both examples are illegal -- there are no where-expressions in Haskell, only where-equations.
(1) (\ x -> (if p x then foo (g x) else foo (h x)) where p ... g ... h ... foo ... )
(2) (\ x -> foo ((if p x then g x else h x)
where
p ... g ... h ... foo ...
)
)
Ignoring the local definition part, however, the answer is no. Lifting foo out of the branches of the conditional is only valid if foo is strict.
Colin R
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell