
On Mon, Dec 27, 2010 at 11:29:29AM -0500, kahl@cas.mcmaster.ca wrote:
Deprecating the export from the prelude sounds okay (should readFile and writeFile then also be taken out of the Prelude?), but an export of the pure catch from System.IO definitely makes sense. (Since the errors are a documented part of the interface, the way of catching them should be there, too.)
But if you want to use both 'catch's in one module, then you're still going to have a name collision. One could say that qualified imports should be used, but having multiple catch's around sounds like a bug waiting to happen (unlike with functions like 'map', which will (almost always) give you a compile time error if you get the wrong one, the wrong 'catch' may silently catch too many or too few exceptions. Perhaps System.IO.Error should export catchIO and tryIO instead? Thanks Ian