[Haskell-cafe] What's up with this Haskell runtime error message:
Roberto Zunino
roberto.zunino at sns.it
Thu Apr 6 09:02:58 EDT 2006
Michael Goodrich wrote:
> Also I know what strict means, but why are you saying that baz is strict?
Because otherwise the loop would be OK. For instance if baz were
baz x = 100 -- lazy
then the equations could be evaluated starting from
c0 = baz z0 = 100
rd0 = c0*c0*m = 100*100*m
-- etc.
and eventually all the variables could be defined.
Another example: the pair constructor (,) is lazy so
c = (3, fst c) -- "loop" on c
is OK, and defines c=(3,3).
Regards,
Roberto Zunino.
More information about the Haskell-Cafe
mailing list