diff options
Diffstat (limited to 'testsuite/tests/rts/T23142.hs')
-rw-r--r-- | testsuite/tests/rts/T23142.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/rts/T23142.hs b/testsuite/tests/rts/T23142.hs new file mode 100644 index 0000000000..75e255c68f --- /dev/null +++ b/testsuite/tests/rts/T23142.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE UnboxedTuples, MagicHash #-} +module T23142 where + +import GHC.IO +import GHC.Exts + +main :: IO () +main = IO (\s -> case newArray# 10# (2 :: Int) s of + (# s', a #) -> case unsafeFreezeArray# a s' of + (# s'', _ #) -> (# s'', () #)) + >> + IO (\s -> case newSmallArray# 10# (2 :: Int) s of + (# s', a #) -> case unsafeFreezeSmallArray# a s' of + (# s'', _ #) -> (# s'', () #)) + >> + IO (atomically# (\s -> catchSTM# (\s -> (# s, () #)) (\_ s -> (# s, () #)) s)) + >> + IO (atomically# (\s -> catchRetry# (\s -> (# s, () #)) (\s -> (# s, () #)) s)) |