On Fri, 8 Oct 1999, Adrian Hey wrote:

> On Fri 08 Oct, Lars Lundgren wrote:
> > A value (IO a) *denotes* a program possibly interacting with the world.
> > *That* program is of course not referentially transparent. A haskell
> > program generating an (IO a) on the other hand *is* referetially
> > transparent. 
> 
> So a value of type (IO a) is _not_ a function, if I understand you
> correctly.
> 

>From haskell point of view, it's a value, end of story. The value denotes
an action possibly doing IO. When this action is executed, it will
probably have side effects (thus, it is not a pure function), after all
thats the sole purpose of IO.

> I think this is really the correct interpretation, but I'm not sure
> if there's any real enthusiasm for this view in the FP community at
> large. (When I suggested a similar approach on another list it didn't
> seem to go down to well.)
> 

I'm sure a lot of poeple have gotten this wrong. I would be surprised if
not all the experienced haskellers has this view though.

> Also, the fact that the machine which executes values of type (IO a)
> is not regarded as part of Haskell is also not widely understood
> I think. (Well, at least I had not understood this before.)  
> 

I agree with this.

/Lars L




Reply via email to