
G'day all.
Quoting Daniel Fischer
The sad truth is that IO actions in general aren't well defined entities (unless we index them with the space-time-coordinates of their invocation).
Not really. One of the ways that IO used to be implemented (still might be on some Haskell systems) was as a term language which was effectively interpreted by the run-time system. You could, in principle, define Eq on such a term language, assuming that there weren't any non-Eq values in subterms. So the question is relevant.
If you cannot agree, I have another question: is
return 4 >> return 5 == return 5
true in the IO-Monad?
It sure is: return 4 >> return 5 == return 4 >>= \x -> return 5 (defn of >>) == (\x -> return 5) 4 (return-bind law) == return 5 Now what was the question again? Cheers, Andrew Bromage