projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82d74b9
)
Generalise the type of mapException; pointed out by Isaac Dupree
author
Ian Lynagh
<igloo@earth.li>
Mon, 4 Aug 2008 16:09:41 +0000
(16:09 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Mon, 4 Aug 2008 16:09:41 +0000
(16:09 +0000)
Control/Exception.hs
patch
|
blob
|
history
diff --git
a/Control/Exception.hs
b/Control/Exception.hs
index
b3638f6
..
812c165
100644
(file)
--- 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)))