From: simonmar Date: Thu, 3 Jun 1999 08:18:15 +0000 (+0000) Subject: [project @ 1999-06-03 08:18:15 by simonmar] X-Git-Tag: Approximately_9120_patches~6160 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1b5e16cc1383c9116b03653ff27a59bd55080e3d;p=ghc-hetmet.git [project @ 1999-06-03 08:18:15 by simonmar] Fix bug in compat version of bracket. --- diff --git a/ghc/compiler/utils/Util.lhs b/ghc/compiler/utils/Util.lhs index 5b4200b..c9b1883 100644 --- a/ghc/compiler/utils/Util.lhs +++ b/ghc/compiler/utils/Util.lhs @@ -768,7 +768,8 @@ f $! x = x `seq` f x bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c bracket before after thing = do a <- before - (thing a) `catch` (\err -> after a >>= fail err) + r <- (thing a) `catch` (\err -> after a >> fail err) after a + return r #endif \end{code}