On Mon, 2004-06-14 at 14:34, Graham Klyne wrote: > I'm finding that a recurring theme in my work with Haskell libraries (and > in particular the XML libraries) is the awkwardness of handling errors > outside the IO monad.
With GHC You can throw exceptions in pure code but may only catch them in the IO monad. As Keith pointed out this is because the language would not be referentially transparent if you could catch exception in 'pure' code. This is often enough in most situations. If you need to catch the exceptions too then you'll want an error monad of some sort. Duncan _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell