[Haskell] specified or not

Scott Turner p.turner at computer.org
Thu Mar 3 09:39:17 EST 2005

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.

More information about the Haskell mailing list