summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/GcStaticPointers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rts/GcStaticPointers.hs')
-rw-r--r--testsuite/tests/rts/GcStaticPointers.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/tests/rts/GcStaticPointers.hs b/testsuite/tests/rts/GcStaticPointers.hs
index 7c2fc2b354..c498af5842 100644
--- a/testsuite/tests/rts/GcStaticPointers.hs
+++ b/testsuite/tests/rts/GcStaticPointers.hs
@@ -14,9 +14,9 @@ import Unsafe.Coerce (unsafeCoerce)
nats :: [Integer]
nats = [0 .. ]
--- Just a StaticPtr to some CAF so that we can deRef it.
-nats_fp :: StaticKey
-nats_fp = staticKey (static nats :: StaticPtr [Integer])
+-- The key of a 'StaticPtr' to some CAF.
+nats_key :: StaticKey
+nats_key = staticKey (static nats :: StaticPtr [Integer])
main = do
let z = nats !! 400
@@ -26,8 +26,8 @@ main = do
print z
performGC
threadDelay 1000000
- let Just p = unsafeLookupStaticPtr nats_fp
+ let Just p = unsafeLookupStaticPtr nats_key
print (deRefStaticPtr (unsafeCoerce p) !! 800 :: Integer)
- -- Uncommenting the next line keeps primes alive and would prevent a segfault
- -- if nats were garbage collected.
+ -- Uncommenting the next line keeps 'nats' alive and would prevent a segfault
+ -- if 'nats' were garbage collected.
-- print (nats !! 900)