projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 2001-03-28 16:38:39 by simonmar]
[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 <- newStablePtr xs
10
print (sum xs)
11
freeStablePtr s1
12
print (sum ys)