[commit: base] master: Add Functor instance for Handler (#7047) (53f4718)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/53f4718af482ca87d55b9dff8bf46ed5624ebe80

>---------------------------------------------------------------

commit 53f4718af482ca87d55b9dff8bf46ed5624ebe80
Author: Simon Marlow <[email protected]>
Date:   Wed Jul 4 12:30:51 2012 +0100

    Add Functor instance for Handler (#7047)

>---------------------------------------------------------------

 Control/Exception.hs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Control/Exception.hs b/Control/Exception.hs
index a13b990..fd4ea0e 100644
--- a/Control/Exception.hs
+++ b/Control/Exception.hs
@@ -164,6 +164,9 @@ import System (ExitCode())
 -- | You need this when using 'catches'.
 data Handler a = forall e . Exception e => Handler (e -> IO a)
 
+instance Functor Handler where
+     fmap f (Handler h) = Handler (fmap f . h)
+
 {- |
 Sometimes you want to catch two different sorts of exception. You could
 do something like
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.