Repository : ssh://[email protected]/haskeline On branch : ghc-head Link : http://git.haskell.org/?p=packages/haskeline.git;a=commit;h=495b00b4f125c0b4e7f1e966cd961eae89cffdc0
>--------------------------------------------------------------- commit 495b00b4f125c0b4e7f1e966cd961eae89cffdc0 Author: Herbert Valerio Riedel <[email protected]> Date: Sat Aug 31 10:31:52 2013 +0200 Avoid shadowing `handlers` variable in `catches` >--------------------------------------------------------------- 495b00b4f125c0b4e7f1e966cd961eae89cffdc0 System/Console/Haskeline/MonadException.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Console/Haskeline/MonadException.hs b/System/Console/Haskeline/MonadException.hs index 31f1e1a..372557d 100644 --- a/System/Console/Haskeline/MonadException.hs +++ b/System/Console/Haskeline/MonadException.hs @@ -106,12 +106,12 @@ handle = flip catch catches :: (MonadException m) => m a -> [Handler m a] -> m a catches act handlers = controlIO $ \(RunIO run) -> - let catchesHandler handlers e = foldr tryHandler (E.throw e) handlers + let catchesHandler e = foldr tryHandler (E.throw e) handlers where tryHandler (Handler handler) res = case E.fromException e of Just e' -> run $ handler e' Nothing -> res - in E.catch (run act) (catchesHandler handlers) + in E.catch (run act) catchesHandler data Handler m a = forall e . Exception e => Handler (e -> m a) _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
