[commit: packages/haskeline] ghc-head: Avoid shadowing `handlers` variable in `catches` Manual merge from git.haskell.org/packages/haskeline.git Original patch by Herbert Valerio Riedel <hvr at gnu.org> (1fb6f88)
git at git.haskell.org
git at git.haskell.org
Sat Oct 12 20:06:49 UTC 2013
Repository : ssh://git@git.haskell.org/haskeline
On branch : ghc-head
Link : http://git.haskell.org/packages/haskeline.git/commitdiff/1fb6f880f84a0b915149fc44c28b26709d2465f9
>---------------------------------------------------------------
commit 1fb6f880f84a0b915149fc44c28b26709d2465f9
Author: Judah Jacobson <judah.jacobson at gmail.com>
Date: Sat Oct 12 18:08:33 2013 +0000
Avoid shadowing `handlers` variable in `catches`
Manual merge from git.haskell.org/packages/haskeline.git
Original patch by Herbert Valerio Riedel <hvr at gnu.org>
>---------------------------------------------------------------
1fb6f880f84a0b915149fc44c28b26709d2465f9
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)
More information about the ghc-commits
mailing list