John Goerzen wrote: > I note, though, that "making an Either into a Monad" doesn't do > anything to deal with asynchronous exceptions. [ snip] > I was referring to exceptions generated by things such as signals, > interrupts, certain network errors, stack problems, etc.
How would you like asynchronous exceptions to fit in? Your original request mentioned that it was annoying to have to use the IO monad for all exceptions, particularly when the exceptions occur in deterministic code. But the IO monad is plainly appropriate for asynchronous exceptions. If what you need is to catch asynchronous exceptions as soon as possible and propogate them as Either-based exceptions, then my sample code can be readily extended in that way. For example, you could catch a network error and propogate it with a message saying that the error occurred during an FTP write operation. This is possible because the monad that's used for the FTP module combines Either with IO. _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell