Add a test for #8035; patch from errge
authorIan Lynagh <ian@well-typed.com>
Sun, 7 Jul 2013 18:07:16 +0000 (19:07 +0100)
committerIan Lynagh <ian@well-typed.com>
Sun, 7 Jul 2013 18:07:16 +0000 (19:07 +0100)
testsuite/tests/rts/T8035.hs [new file with mode: 0644]
testsuite/tests/rts/all.T

diff --git a/testsuite/tests/rts/T8035.hs b/testsuite/tests/rts/T8035.hs
new file mode 100644 (file)
index 0000000..73afc7f
--- /dev/null
@@ -0,0 +1,10 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
+import Control.Exception
+import Control.Monad
+import GHC.Conc
+
+main = join $ atomically $ do
+  catchSTM
+    (throwSTM ThreadKilled `orElse` return (putStrLn "wtf"))
+    (\(e::SomeException) -> return (putStrLn "ok"))
index 9a7f2fe..46c368f 100644 (file)
@@ -179,3 +179,4 @@ test('T7919', [extra_clean(['T7919A.o','T7919A.hi',
                when(fast(),skip) ],
              compile_and_run, [''])
 
+test('T8035', normal, compile_and_run, [''])