summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-26 12:08:54 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-26 12:08:54 -0400
commit9a67f9cb8d0ce6da314b080228ac2cea55ee612a (patch)
tree451b0e82dfbb8901004ac0b025b95fb9a58f2e2e /test.hs
parenta72f0ecc273a28bb4b12d8454e2e0f99278012ee (diff)
use Control.Exception's brackets
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/test.hs b/test.hs
index d4c1366d0..e625fbd75 100644
--- a/test.hs
+++ b/test.hs
@@ -11,7 +11,7 @@ import Test.QuickCheck
import System.Posix.Directory (changeWorkingDirectory)
import System.Posix.Files
-import IO (bracket_, bracket)
+import Control.Exception (bracket_, bracket)
import System.IO.Error
import System.Posix.Env
import qualified Control.Exception.Extensible as E
@@ -523,8 +523,7 @@ indir dir a = do
-- Assertion failures throw non-IO errors; catch
-- any type of error and change back to cwd before
-- rethrowing.
- r <- bracket_ (changeToTmpDir dir)
- (\_ -> changeWorkingDirectory cwd)
+ r <- bracket_ (changeToTmpDir dir) (changeWorkingDirectory cwd)
(E.try (a)::IO (Either E.SomeException ()))
case r of
Right () -> return ()