[Haskell-cafe] Re: ANNOUNCE: New versions of ALL the monadic regions packages

Bas van Dijk v.dijk.bas at gmail.com
Thu Jan 7 14:44:37 EST 2010


On Thu, Jan 7, 2010 at 5:18 PM, Bulat Ziganshin
<bulat.ziganshin at gmail.com> wrote:
> Hello Bas,
>
> Thursday, January 7, 2010, 6:25:34 PM, you wrote:
>
>> So now I'm confused... are these standard file handles always open on
>> program startup or are there abnormal situations when they are closed?
>
> afaik, parent process may close them before executing your program,
> it's used in particular for running daemons

Thanks Bulat for explaining.

Then I think the standard handles should have a type that at least
encodes that they may be closed as in:

stdin ∷ MonadCatchIO pr
      ⇒ RegionT s pr (Maybe (RegionalFileHandle R (RegionT s pr)))

where Nothing means that the standard handle is closed.

However this still leaves open problem 1, 2 and 3.

Thanks,

Bas


More information about the Haskell-Cafe mailing list