David Roundy wrote:
On Sun, Dec 31, 2006 at 07:46:44PM +0100, Eric Y. Kow wrote:
Argh! I spoke too soon. These patches make the external.pl script hang
on Unix. The problem seems to be that the patch switches from the
bracket in the old IO module to the new Control.Exception.bracket.
The two brackest differ in what they are able to catch, since the two
catches differ. IO.bracket (same as, I believe, System.IO.bracket) doesn't
catch asynchronous errors, I believe. The semantics is confusing, to say
the least, and I've not got time to debug anything now.
The difference is indeed along those lines: IO.bracket only catches IO
exceptions, because Haskell 98 only had IO exceptions; IO.bracket is a Haskell
98 function, we keep it around for backwards compatibility only, I don't
recommend using it except in a program that is supposed to be pure Haskell 98.
System.IO.bracket doesn't exist (maybe it did at some point in the past, I don't
remember).
Control.Exception.bracket catches all kinds of exceptions, and additionally is
safe in the presence of asynchronous exceptions. That's the one to use.
I'm surprised if the difference would lead to anything hanging, though...
Cheers,
Simon
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel