projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64b08aa
)
[project @ 1999-06-03 08:18:15 by simonmar]
author
simonmar
<unknown>
Thu, 3 Jun 1999 08:18:15 +0000
(08:18 +0000)
committer
simonmar
<unknown>
Thu, 3 Jun 1999 08:18:15 +0000
(08:18 +0000)
Fix bug in compat version of bracket.
ghc/compiler/utils/Util.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/utils/Util.lhs
b/ghc/compiler/utils/Util.lhs
index
5b4200b
..
c9b1883
100644
(file)
--- 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}