The Proper Definition of (evaluate :: a -> IO a)

Nils Anders Danielsson nad at
Mon May 7 11:19:50 EDT 2007

On Mon, 07 May 2007, Malcolm Wallace <Malcolm.Wallace at> wrote:

> Isaac Dupree <isaacdupree at> 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

You seem to be assuming that evaluate ⊥ = ⊥, which is not necessarily
the case.

> Where did you find the erroneous version?

Presumably he found it by reading the documentation for evaluate:


More information about the Libraries mailing list