
Brandon S. Allbery KF8NH wrote:
On May 8, 2009, at 13:08 , Sittampalam, Ganesh wrote:
Brandon S. Allbery KF8NH wrote:
and therefore must be in IO. You may be thinking that it would return a result for _|_, but as described if you fed it _|_ it could only produce False (if the _|_ has been evaluated you would not be able to reach the test).
It could probably return True in GHC since you can catch exceptions. That still doesn't mean it solves the halting problem, of course.
Unless it catches exceptions itself (which strikes me as a bad idea; it becomes a trivial way to ignore exceptions, leading to bad programming practices) either they're handled inside the _|_ (in which case it isn't _|_ from the standpoint of our test) or in an outer scope (in which case our test produces _|_ from the standpoint of the exception handler).
Surely it just needs to inspect the thunk to decide whether it's _|_ or not, rather than entering it? Ganesh =============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===============================================================================