[Haskell] line-based interactive program

Wolfgang Jeltsch wolfgang at jeltsch.net
Fri Jul 8 15:55:48 EDT 2005

Am Freitag, 8. Juli 2005 18:43 schrieb Andrew Pimlott:
> [...]

> It is one thing to embrace lazy evaluation order, and another to embrace
> lazy IO (implemented using unsafeInterleaveIO).  As a relative newcomer
> to Haskell, I got the impression that the "interact" style was always a
> hack, discarded for good reason in favor of the IO monad.  Is there a
> strong case for interact?

unsafeInterleaveIO is useful roughly because of the same resons, lazy 
evaluation is useful.  For example, you don't need to overspecify the 
relative order in which certain I/O primitives occur.  The problem with it 
is, of course, that it's unsafe.

As part of my diploma thesis, I'm working on a small collection of modules 
which provides safe I/O interleaving.  The key point is to split the state of 
the world since I/O on different parts of the world can be interleaved 
arbitrarily.  If someone is interested, I can post more details.

> Andrew

Best wishes,

More information about the Haskell mailing list