"interact" behaves oddly if used interactively

Koen Claessen koen at cs.chalmers.se
Wed Oct 1 16:43:19 EDT 2003

Simon Marlow wrote:

 | For example, eager evaluation would be a completely
 | valid implementation strategy for Haskell if it were
 | not for lazy I/O.

I do not understand this remark.

As far as I know, in any valid implementation of Haskell,
the following expression:

  const 3 undefined

should always produce 3; any valid evaluation strategy for
Haskell should respect not trying to evaluate something like
undefined if it is not needed for the computation.

I see no difference between that and that any valid Haskell
implementation should avoid trying to read a character from
the input if it is not needed.


More information about the Haskell mailing list