On Sun, Jul 6, 2008 at 4:31 PM, Henning Thielemann <lemming@henning-thielemann.de> wrote:
On Sun, 6 Jul 2008, David Menendez wrote:
data DivideByZero = DivideByZero deriving (Show, Typeable)
Maybe I annoy you with my distinction of errors and exceptions, but I consider DivideByZero a bad example for an exception, because it is more an error (I see it is used in the extensible exception paper anyway).
It's also in the current Control.Exception library. While dividing by zero or accessing an array out of bounds isn't the same as a file not existing, I'm not sure we need different mechanisms for dealing with them. If your code divides by zero, you still want any "finally" or "bracket" clauses to get called before the program terminates. -- Dave Menendez <dave@zednenem.com> <http://www.eyrie.org/~zednenem/>