[Haskell-cafe] Re: philosophy of Haskell

Brandon S Allbery KF8NH allbery at ece.cmu.edu
Sun Aug 15 12:49:25 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/15/10 11:40 , Tillmann Rendel wrote:
> But in a world passing interpretation of IO, print is supposed to be a pure
> Haskell function. So the value world2 can only depend on the values of print
> and world1, but not on the actions of some concurrent thread.
> 
> If print is not restricted to be a pure Haskell function, we don't need the
> world passing in the first place.

I am confused by this discussion.  I originally thought some time back that
IO was about "world passing", but in fact it's just handing off a baton to
insure that a particular sequence of IO functions is executed in the
specified sequence and not reordered.  Nothing in the "baton" is intended to
represent the actual "state of the world", nor is anything said about
concurrent actions either in another thread of the current program or
elsewhere outside the program; only ordering of calls in the *current*
thread of execution.  (Which, hmm, implies that unsafePerformIO and
unsafeInterleaveIO are conceptually similar to forkIO.)

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxoGpUACgkQIn7hlCsL25U5SwCglJdUpOKbrFLmDO2X22nDq/no
UTIAoMllTt9LXOlblVaocbtVnRIx4dMY
=hCIW
-----END PGP SIGNATURE-----


More information about the Haskell-Cafe mailing list