[Haskell-cafe] evaluation semantics of bind

Richard O'Keefe ok at cs.otago.ac.nz
Mon Feb 9 23:17:06 EST 2009

On 10 Feb 2009, at 5:07 pm, Gregg Reynolds wrote:
> Thanks.  I see the error of my ways.  So, IO expressions must be  
> evaluated if they are in the chain leading to main.

We need some standard terminology to distinguish
between *evaluating* an expression and *performing*
the result of an expression of type IO something.

An IO expression that is passed to a function at a
strict position must be evaluated whether the result
is performed or not.

An IO expression whose result will be performed must
be evaluated before that performance can take place.

(Dash it, this really is getting us into White Knight land.)

More information about the Haskell-Cafe mailing list