From 0598083cfccabdb9064c259c698d05fc79fc1a9e Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 4 Aug 2008 16:09:41 +0000 Subject: [PATCH] Generalise the type of mapException; pointed out by Isaac Dupree --- Control/Exception.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/Exception.hs b/Control/Exception.hs index b3638f6..812c165 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -358,7 +358,7 @@ handleJust p = flip (catchJust p) -- Notice that the usage of 'unsafePerformIO' is safe here. -mapException :: Exception e => (e -> e) -> a -> a +mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a mapException f v = unsafePerformIO (catch (evaluate v) (\x -> throw (f x))) -- 1.7.10.4