Typo
[packages/base.git] / tests / stableptr004.hs
1 import Foreign.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 <- newStablePtr xs
10 print (sum xs)
11 freeStablePtr s1
12 print (sum ys)