>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.

I imagine expressions like x==x could appear as the result of
transformations in program specialisation, like specialising

f x x

where

f x y = if x==y then ....

Replacing x==x with True is of course still unsafe in Haskell, for the
reasons already pointed out.

Björn Lisper

Reply via email to