Proposal: Extensible exceptions
isaacdupree at charter.net
Tue Jul 8 06:09:14 EDT 2008
Ian Lynagh wrote:
> On Mon, Jul 07, 2008 at 01:51:11PM -0400, Isaac Dupree wrote:
>> I have type issues. Look how inconsistent these types are (I think,
>> copied from the patch); some use forall and some use SomeException:
>> catchAny :: IO a -> (forall e . Exception e => e -> IO a) -> IO a
>> setUncaughtExceptionHandler :: (SomeException -> IO ()) -> IO ()
>> getUncaughtExceptionHandler :: IO (SomeException -> IO ())
> setUncaughtExceptionHandler/getUncaughtExceptionHandler look like they
> are really part of GHC.TopHandler, which is really internal to GHC. That
> still needs to be sorted out properly.
hmm, they're not really supposed to be part of the Exception API? Fine
>> catchAny :: IO a -> (SomeException -> IO a) -> IO a
>> Then we don't even need the Rank2Types extension?
> I think that's an option, yes, but we do still need
> ExistentialQuantification, so I'm not sure how much it buys us.
well, IIRC nhc98/Yhc's current type system supports
ExistentialQuantification but not Rank2Types, which is why I thought it
More information about the Libraries