summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/array/should_run/arr018.hs
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-07-04 10:49:31 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-07-04 10:49:31 +0000
commita22d846ce8f0c0297a3145e68417e7e6e4a0f19c (patch)
tree225334231440de9f5947ebb9b8d073cde3ea83d8 /testsuite/tests/ghc-regress/array/should_run/arr018.hs
parentcb8ee078a6844846f378f05bd115ab75de42888f (diff)
downloadhaskell-a22d846ce8f0c0297a3145e68417e7e6e4a0f19c.tar.gz
add test for #1131
Diffstat (limited to 'testsuite/tests/ghc-regress/array/should_run/arr018.hs')
-rw-r--r--testsuite/tests/ghc-regress/array/should_run/arr018.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/array/should_run/arr018.hs b/testsuite/tests/ghc-regress/array/should_run/arr018.hs
new file mode 100644
index 0000000000..27896aae39
--- /dev/null
+++ b/testsuite/tests/ghc-regress/array/should_run/arr018.hs
@@ -0,0 +1,16 @@
+-- test for #1131
+import Control.Monad.ST
+import Data.Array.ST
+import Data.Array
+import System.Mem
+
+tickle :: Int
+tickle = runST (do {
+ x <- newArray_ (0,100) ;
+ (readArray :: STUArray s Int Int -> Int -> ST s Int) x 3
+ })
+
+main :: IO ()
+main = do print $ length (replicate 100000 'a')
+ performGC
+ print tickle