3 Mar
2005
3 Mar
'05
2:56 p.m.
Evaluation is driven by pattern matching, and the order of pattern matching is specified. The order is left to right, outside to inside. See section 3.17 of the Haskell Report: http://www.haskell.org/onlinereport/exps.html#sect3.17 Arthur On 3-mrt-05, at 15:39, Scott Turner wrote:
Is the behavior of evaluating z unspecified? z = f (0, z) f x = case x of (1,1) -> z _ -> 0 Hugs and GHC agree that z evaluates to 0. However, if the first line is changed to z = f (z,0) then both implementations loop. In other words, the behavior depends on order of evaluation, which AFAIK is not specified. _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell