[Haskell-cafe] is value evaluated?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri May 8 13:25:55 EDT 2009

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).

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090508/025ba76e/PGP.bin

More information about the Haskell-Cafe mailing list