
7 May
2007
7 May
'07
3:19 p.m.
On Mon, 07 May 2007, Malcolm Wallace
Isaac Dupree
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: http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.htm... -- /NAD