Hello Michael,

Thursday, June 15, 2006, 3:32:12 PM, you wrote:

> However, this handler catches IO exceptions only!
> Following the advice from this thread I changed the handler as follows:

>      Control.Exception.catch

that is a well-known (for gurus :) problem. Haskell98 supports
catching of IO exceptions only and corrresponding 'catch' was even included in
Prelude. modern Haskell compilers supports catching of any exceptions
but to ensure full H98 compatibility, function to catch all exceptions
is exposed under different name, namely Control.Exception.catch. so to use
"proper" catching you need to work via functions in these module,
either qualifying them or hiding 'catch' from Prelude:

import Prelude hiding (catch)
import Control.Exception

if you still don't read "Tackling the awkward squad: monadic
input/output, concurrency, exceptions, and foreign-language calls in Haskell"
http://research.microsoft.com/Users/simonpj/papers/marktoberdorf/marktoberdorf.ps.gz

- i highly recommend you this paper


-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to