Exceptions vs. Errors (Re: Readline read_history and write_history addition)

Henning Thielemann lemming at henning-thielemann.de
Wed Jan 23 01:54:41 EST 2008

On Wed, 23 Jan 2008, Yitzchak Gale wrote:

> If we start throwing IO exceptions for common and minor
> occurrences like no readline history available, libraries like
> this become impossible to write in Haskell. And code
> that has already been written becomes unusable.

 It seems that this discussion has no longer to do with readline but with
correct exception handling in Haskell. Did someone follow my links to the
Haskell wiki articles Error and Exception? Haskell libraries mix these
terms in an unfortunate way.
 Events like "no history available" are precisely the things that are
called "exceptions" (not errors) - situations that cannot be avoided by
the programmer but must be handled. An approved method to handle these
cases are 'try' constructs. Now if 'bracket' does not work for general
MonadIO then it should be generalized.

More information about the Libraries mailing list