Add test for #7787
authorSimon Marlow <marlowsd@gmail.com>
Fri, 19 Jul 2013 09:17:05 +0000 (10:17 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 19 Jul 2013 09:17:05 +0000 (10:17 +0100)
tests/T7787.hs [new file with mode: 0644]
tests/T7787.stdout [new file with mode: 0644]
tests/all.T

diff --git a/tests/T7787.hs b/tests/T7787.hs
new file mode 100644 (file)
index 0000000..883f4a9
--- /dev/null
@@ -0,0 +1,8 @@
+import Control.Concurrent.MVar
+import Control.Exception
+
+main = do
+  mv <- newMVar 'x'
+  e <- try (modifyMVar mv $ \_ -> return undefined)
+  let _ = e :: Either SomeException ()
+  withMVar mv print -- should not hang
diff --git a/tests/T7787.stdout b/tests/T7787.stdout
new file mode 100644 (file)
index 0000000..44cf16f
--- /dev/null
@@ -0,0 +1 @@
+'x'
index ff8c723..37e3c13 100644 (file)
@@ -131,3 +131,4 @@ test('CatPairs', normal, compile, [''])
 test('CatEntail', normal, compile, [''])
 
 test('T7653', normal, compile_and_run, [''])
+test('T7787', normal, compile_and_run, [''])