Proposal: add Functor instance to Control.Exception.Handler

Patrick Palka patrick at parcs.ath.cx
Sun Mar 18 18:30:57 CET 2012


A Functor instance for Handler could be useful: e.g.

foo :: IO (Maybe a)
handlers :: [Handler ()]

foo `catches` map (Nothing <$) handlers

Proposed instance definition:

instance Functor Handler where
     fmap f (Handler h) = Handler (fmap f . h)

Deadline: 2 weeks



More information about the Libraries mailing list