[Haskell-cafe] Re: philosophy of Haskell
rendel at Mathematik.Uni-Marburg.de
Sun Aug 15 11:40:54 EDT 2010
Ertugrul Soeylemez wrote:
>>> let (x, world1) = getLine world0
>>> world2 = print (x+1) world1
> If between 'getLine' and 'print' something was done by a
> concurrent thread, then that change to the world is captured by 'print'.
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.
More information about the Haskell-Cafe