X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FException.hs;h=3c7600515a13abc68950bf74c3730b17db71edd1;hb=479b0241032c8b02999e0852f63d57fe3584edf9;hp=c51c2329ca870beced028c3520a0fe0abd57da0e;hpb=1a93895686c5ad0dfd3fd1279a4bd51fd5a3279e;p=ghc-hetmet.git diff --git a/compiler/utils/Exception.hs b/compiler/utils/Exception.hs index c51c232..3c76005 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)