Proposal: Extensible exceptions

Isaac Dupree isaacdupree at charter.net
Thu Jul 10 10:58:18 EDT 2008


Henning Thielemann wrote:
> It seems that nobody except me is interested in handling specifically 
> (up to a certain level) the exceptional cases that an IO action can lead 
> to. If I see the type signature
>   getLine :: IO String
>  I have no idea, what kind of exceptions can occur.

I agree!  I want to see a nice API that exposes exceptions in the type. 
  Go to work, maybe put something on Hackage that has an API like you 
want, that you'd use, for some important set of IO functions.  Changing 
from non-extensible to extensible exceptions (and the base breakup it 
allows) doesn't seem to make this harder.  (Possibly it even makes it 
easier in the long run, especially if you find some useful way to 
leverage the new exception type hierarchy).

-Isaac


More information about the Libraries mailing list