523bdb228a7adf013f1b7588500aca4afc86e99b
[ghc-hetmet.git] / ghc / tests / lib / should_run / stableptr004.hs
1 import StablePtr
2
3 -- compile without optimisation.
4 -- run with +RTS -D256 to see the stable pointer being garbage collected.
5
6 main = do
7   let xs = [ 1 .. 50000 ]
8   let ys = [ 1 .. 60000 ]
9   s1 <- makeStablePtr xs
10   print (sum xs)
11   freeStablePtr s1
12   print (sum ys)