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 _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
