[commit: base] data-proxy,master: Add test for #7787 (0b02a2e)

Richard Eisenberg eir at ghc.haskell.org
Tue Jul 23 16:04:16 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branches: data-proxy,master

http://hackage.haskell.org/trac/ghc/changeset/0b02a2e51a006d8f7bfd28830c9d5b13b43bd663

>---------------------------------------------------------------

commit 0b02a2e51a006d8f7bfd28830c9d5b13b43bd663
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Fri Jul 19 10:17:05 2013 +0100

    Add test for #7787

>---------------------------------------------------------------

 tests/T7787.hs     |    8 ++++++++
 tests/T7787.stdout |    1 +
 tests/all.T        |    1 +
 3 files changed, 10 insertions(+)

diff --git a/tests/T7787.hs b/tests/T7787.hs
new file mode 100644
index 0000000..883f4a9
--- /dev/null
+++ b/tests/T7787.hs
@@ -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
index 0000000..44cf16f
--- /dev/null
+++ b/tests/T7787.stdout
@@ -0,0 +1 @@
+'x'
diff --git a/tests/all.T b/tests/all.T
index ff8c723..37e3c13 100644
--- a/tests/all.T
+++ b/tests/all.T
@@ -131,3 +131,4 @@ test('CatPairs', normal, compile, [''])
 test('CatEntail', normal, compile, [''])
 
 test('T7653', normal, compile_and_run, [''])
+test('T7787', normal, compile_and_run, [''])






More information about the ghc-commits mailing list