[Haskell-cafe] is value evaluated?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri May 8 12:56:48 EDT 2009

On May 8, 2009, at 01:33 , Joe Fredette wrote:
> That strikes me as being bad in a "I'm violating the Halting  
> Problem" sort of way- but I'm not sure how. Is there some  
> contradictory construction that
> could be built from such a function?

I don't think it is; surely the Haskell runtime knows which thunks it  
has evaluated.  It just explicitly violates referential transparency,  
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).

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/d5bbfc32/PGP.bin

More information about the Haskell-Cafe mailing list