[Haskell-cafe] Re: Referential Transparency and Monads

2009-04-09 Thread Heinrich Apfelmus
Luke Palmer wrote:
 Miguel Mitrofanov wrote:
 
 I'm not sure what you mean by that, but semantically IO is definitely
 *not* a state monad.  Under any circumstances or any set of assumptions.

 Ehm? Why not?
 
 
 Mainly forkIO.  There may be other reasons.

Tackling the awkward squad mentions that

  loop  :: IO ()
  loop  = loop

and

  loop' :: IO ()
  loop' = putStr o  loop'

are indistinguishable in the

  IO a  ~  World - (a, World)

semantics. Both expressions would be _|_. But clearly, the latter
produces some output while the former just hangs.


Regards,
apfelmus

--
http://apfelmus.nfshost.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Referential Transparency and Monads

2009-04-09 Thread Brandon S. Allbery KF8NH

On 2009 Apr 10, at 1:09, Jonathan Cast wrote:

On Fri, 2009-04-10 at 01:03 -0400, Brandon S. Allbery KF8NH wrote:

On 2009 Apr 10, at 0:52, Jonathan Cast wrote:

On Fri, 2009-04-10 at 00:46 -0400, Brandon S. Allbery KF8NH wrote:

IO a  ~  World - (a, World)


I still don't understand this; we are passing a World and getting a
World back,


We are?  Why do you think that?


Because that's what (World - (a,World)) means, last I checked.


Does

   undefined :: (a, World)

contain a World?


Does

 undefined :: Sum Int

contain an Int?  Please use some common sense, your recent responses  
are increasingly incoherent.


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




PGP.sig
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe