The Proper Definition of (evaluate :: a -> IO a)
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Mon May 7 06:13:29 EDT 2007
Isaac Dupree <isaacdupree at charter.net> wrote:
> The obvious "evaluate x = x `seq` return x" fails one of the following
> laws for evaluate:
>
> evaluate x `seq` y ==> y
I'm not sure why anyone thinks this "law" should hold, since it
completely changes the known semantics of `seq`. A more accurate law
would be:
evaluate x `seq` y ==> if x==_|_ then _|_ else y
Where did you find the erroneous version?
Regards,
Malcolm
More information about the Libraries
mailing list