Commit 8e08f83a authored by Simon Marlow's avatar Simon Marlow
Browse files

Add Functor instance for Handler (#7047)

parent 9e3fb41b
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment