Haskell 98: Behaviour of hClose

David Feuer dfeuer@techhouse.org
Wed, 18 Sep 2002 12:08:15 -0400 (EDT)


On Wed, 18 Sep 2002, Simon Peyton-Jones wrote:

> What I intended was
> 	a simple interactive Haskell program should behave the same
> 	on any OS/environment
>
> What you and Ross seem to be saying is
> 	no, the behaviour of the program can, and should, depend
> 	on the OS/environment
>
> 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?

This is probably a non-issue.  If you start trying to specify details like
echoing, you might as well go into the details of which pixels are
supposed to light up on the monitor, or how the teletype should behave.
If you indicate leeway then implementors will probably "do the right
thing" in all or nearly all cases.  Note that the Report does not (really
cannot) precisely specify what happens when multiple programs access the
same file at once, or what happens when a program receives a SIGHUP signal
(because its controlling terminal has disconnected) or all sorts of other
things that are not really any of its business.

David