[Haskell-cafe] Re: [Haskell] Top Level <-

Ganesh Sittampalam ganesh at earth.li
Sun Aug 31 10:44:06 EDT 2008

On Sun, 31 Aug 2008, Brandon S. Allbery KF8NH wrote:

> On 2008 Aug 31, at 10:34, Ganesh Sittampalam wrote:

>> I don't follow what you mean. stdin, stdout and stderr are just file 
>> descriptors 0, 1 and 2, aren't they? You can create them as many times as 
>> you want with using that information without causing any confusion or 
>> conflict. Whereas the <- proposal has a "once-only" requirement.
> The convention is to provide buffered versions to improve the performance of 
> file I/O.  These buffered filehandles must be created once per runtime 
> instance (and ideally once per process so multiple runtimes don't find 
> themselves overwriting each others' output).

In that case it seems that any library that might be used from a runtime 
that isn't the top-level of a process should avoid doing IO to those 
handles, for fear of producing output corruption?


More information about the Haskell-Cafe mailing list