Haskell 98: Behaviour of hClose

Ferenc Wagner wferi@afavant.elte.hu
Wed, 18 Sep 2002 18:05:51 +0200


"Simon Peyton-Jones" <simonpj@microsoft.com> writes:

> If that's the consensus I'll happily leave echoing
> behaviour unspecified. Remember, that means that a
> conforming implementation can do whatever it pleases, and
> hence it's impossible to write a portable interactive
> Haskell program.  Is that you what you intend?

The Report should not let an implementation do whatever it
pleases.  But it could specify that the runtime system *does
not mess* with the terminal settings, so users' preferences
prevail.  For buffering, the recipe is: terminals are line
buffered, everything else is block buffered.  I find this
appropriate for most applications, except some close (one
keypress) interactions, which are done better via
specialised libraries anyway.  (I have to admit I'm from the
Unix world.  Other perspectives are surely possible.)

                                             Feri.