Skip to content
Snippets Groups Projects
Commit 1b5e16cc authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1999-06-03 08:18:15 by simonmar]

Fix bug in compat version of bracket.
parent 64b08aae
No related branches found
No related tags found
No related merge requests found
......@@ -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}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment