summaryrefslogtreecommitdiff
path: root/compiler/utils/Exception.hs
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2009-07-01 20:03:44 +0000
committerMax Bolingbroke <batterseapower@hotmail.com>2009-07-01 20:03:44 +0000
commit9d0c8f842e35dde3d570580cf62a32779f66a6de (patch)
treedbe3743f4ff24c8d4ed7129c780b179275e3748e /compiler/utils/Exception.hs
parentab1d5052de53479377c961d1e966f0cf0b82c592 (diff)
downloadhaskell-9d0c8f842e35dde3d570580cf62a32779f66a6de.tar.gz
Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
Diffstat (limited to 'compiler/utils/Exception.hs')
-rw-r--r--compiler/utils/Exception.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/utils/Exception.hs b/compiler/utils/Exception.hs
index c51c2329ca..3c7600515a 100644
--- a/compiler/utils/Exception.hs
+++ b/compiler/utils/Exception.hs
@@ -62,13 +62,13 @@ class Monad m => ExceptionMonad m where
gblock (do
a <- before
r <- gunblock (thing a) `gonException` after a
- after a
+ _ <- after a
return r)
a `gfinally` sequel =
gblock (do
r <- gunblock a `gonException` sequel
- sequel
+ _ <- sequel
return r)
instance ExceptionMonad IO where
@@ -89,6 +89,6 @@ ghandle = flip gcatch
-- second argument is executed and the exception is raised again.
gonException :: (ExceptionMonad m) => m a -> m b -> m a
gonException ioA cleanup = ioA `gcatch` \e ->
- do cleanup
+ do _ <- cleanup
throw (e :: SomeException)