[Haskell-cafe] Re: philosophy of Haskell

Patai Gergely patai_gergely at fastmail.fm
Sun Aug 15 14:59:45 EDT 2010

> No.  As you say the world1 value is immutable, but that's not
> contradictory.  If between 'getLine' and 'print' something was done by a
> concurrent thread, then that change to the world is captured by 'print'.
Well, that's technically true, but it basically amounts to saying that
the 'model' of IO is itself. If I see 'print x', I don't really think of
an action that performs arbitrary side effects and prints x in the
process (unless some error prevents even that). Some notion of
compositionality is required, which would allow me to state how 'print
x' contributes to the changes of the world in a way that doesn't depend
on any context. Actions in the state monad are composable in that sense,
while the same doesn't apply to the IO monad when explained in terms of
state passing.


http://www.fastmail.fm - The professional email service

More information about the Haskell-Cafe mailing list