On Thu, 2009-03-05 at 13:08 +, Simon Marlow wrote:
> Lennart Augustsson wrote:
> > I don't see any breaking of referential transparence in your code.
> > Every time you do an IO operation the result is basically
> > non-deterministic since you are talking to the outside world.
> > You're assumi
On 2009 Mar 5, at 8:08, Simon Marlow wrote:
So the argument is something like: we can think of the result of a
call to unsafeInterleaveIO as having been chosen at the time we
called unsafeInterleaveIO, rather than when its result is actually
evaluated. This is on dodgy ground, IMO: either yo
On Thu, Mar 5, 2009 at 7:08 AM, Simon Marlow wrote:
>
> So the argument is something like: we can think of the result of a call to
> unsafeInterleaveIO as having been chosen at the time we called
> unsafeInterleaveIO, rather than when its result is actually evaluated. This
> is on dodgy ground, I
On Thu, Mar 5, 2009 at 2:08 PM, Simon Marlow wrote:
>
> So the argument is something like: we can think of the result of a call to
> unsafeInterleaveIO as having been chosen at the time we called
> unsafeInterleaveIO, rather than when its result is actually evaluated. This
> is on dodgy ground, IM
On Thu, 2009-03-05 at 13:08 +, Simon Marlow wrote:
> Lennart Augustsson wrote:
> > I don't see any breaking of referential transparence in your code.
> > Every time you do an IO operation the result is basically
> > non-deterministic since you are talking to the outside world.
> > You're assumi
You're assuming that IO operations have semantics.
>From the Haskell program's point of view, and when reasoning about
Haskell programs (not their interaction with the world) you should
assume that every IO operation returns a random result.
The way Oleg's program behaves does not break RT under t
Lennart Augustsson wrote:
I don't see any breaking of referential transparence in your code.
Every time you do an IO operation the result is basically
non-deterministic since you are talking to the outside world.
You're assuming the IO has some kind of semantics that Haskell makes
no promises abo