On Wed, Sep 17, 2008 at 10:11:28PM +0200, Manlio Perillo wrote:
> David Roundy ha scritto:
>> [...]
>> In particular, the code Don quoted is incorrect depending on which
>> import statements are used.  If we assume that the default is the
>> bracket available in Haskell 98, then it is definitely incorrect.
>>
>> It also doesn't behave properly in the presence of signals or keyboard
>> interrupts (i.e. posix or windows systems).  
>
> Maybe a withSignalsMasked function, at least on Posix systems (it is not  
> defined in System.Posix.Signals)?

Darcs does something like this, and I obviously think it should be
moved into the standard libraries.  In my opinion signals ought to
throw asynchronous exceptions by default, then we'd have unified
handling of exceptional cases.

> I have no idea how signals works under Windows.

Windows doesn't have signals per se, but does have something similar
for keyboard interrupts, which in darcs we also convert into an
asynchronous exception.  I'm not clear as to how well it works.  Under
cygwin shells, ctrl-C does something other than send a windows
keyboard interrupt, so darcs doesn't work so well in that
environment.

David
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to