On Wed, Sep 22, 2010 at 3:18 AM, Mitar <mmi...@gmail.com> wrote: > What would I also like to see in Haskell is that it would be somehow > possible to see which all exceptions could your function (through used > functions there) throw. In this way it would be really possible to > make async-exception-safe functions (as we really do not want > catch-all all around). (Of course the problem with this approach is if > somebody changes underlying function it could get additional possible > exception(s) to be thrown.) > > So it would be even better if this would be solved like pattern > matching warning (so you could see if you are missing some exception > through warning) or even better: that type system would enforce you to > or catch or declare throwing/passing exception yourself. Similar how > Java has. > > Because one other major Haskell's selling point is that you (are said > to) know from type if and which side-effects a function has. This is > the story behind IO monad. And with exceptions you do not have this > information anymore. I believe this should be visible through type > system. > > Something like: > > http://paczesiowa.blogspot.com/2010/01/pure-extensible-exceptions-and-self.html
For type-safe _synchronous_ exception handling we have Pepe Iborra's: http://hackage.haskell.org/package/control-monad-exception However we don't have anything similar for asynchronous exception handling. What will a type-safe asynchronous exception handling API look like? What guarantees should it provide? Regards, Bas _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe