
On 22/07/2009 08:19, Iavor Diatchki wrote:
Hello,
On Mon, Jul 20, 2009 at 10:11 PM, Duncan Coutts
wrote: On Mon, 2009-07-20 at 09:27 +0300, Iavor Diatchki wrote:
Hello, Please do not remove OldException. -Iavor
Can you give any rationale? Are you trying to maintain compatibility with base-3 by using CPP + OldException? Is that significantly easier than using the extensible-exceptions package?
1. I would have to go and change all code that uses exceptions, again. 2. I am not sure how to write backwards compatible code. CPP + OldException is not pretty but it works. 3. The extensible exception package is not Haskell 98 (it uses existentials), so it really would be nice if _it_ was placed in a separate package.
Not practical, unfortunately. Exceptions are very deeply wired in: they are even dependended on by the Monad IO instance, for example (for "fail", which is well-named), and the Prelude exports catch. Not the extensible version of course, but the Prelude's catch is defined in terms of the extensible catch.
On that topic, it would be great if we had a way to see what are all the extensions used by a program (including those used by dependent packages).
A prerequisite is to make it an error to use any extensions not declared in the .cabal file. We talked about this a long time ago, but never got around to doing anything about it. Having done that, you can easily see what extensions are being used by a package: look in the .cabal file. Cabal-install could figure out the extensions used by dependencies, although it would always include base which uses a raft of extensions, so I'm not sure how useful that would be.
4. Ian's proposal did not provide any motivation for this change. Is the benefit the we clean things up a bit? If so, I think that it is a bit soon to do it.
Ok. We should at least deprecate Control.OldException, so we can remove it in 6.14? Cheers, Simon