Simon PJ says:
Did you try "seq"?
x `seq` y
should evalute x to WHNF before returning y. If x is a pair
you may need to say
seqPair x `seq` y
where
seqPair (a,b) = a `seq` b
in order to force the
"Ch. A. Herrmann" wrote:
Hi,
John There's an easier way to force structures hyperstrictly. To
John force x to be evaluated to normal form before computing y,
John write (x==x) `seq` y
I'm heavily confused here.
What happens, if
(a) an optimizer replaces (x==x) by True?
John Hughes [EMAIL PROTECTED] writes:
As far as the power of the optimizer is concerned, my guess is programmers
very rarely write x==x (unless they MEAN to force x!), so the loss of
optimization doesn't matter. Of course, in principle, an optimizer *could*
replace x==x by x`seq`True (if x