diff options
author | Facundo DomÃnguez <facundo.dominguez@tweag.io> | 2014-12-22 19:15:36 -0200 |
---|---|---|
committer | Facundo DomÃnguez <facundo.dominguez@tweag.io> | 2014-12-22 19:16:54 -0200 |
commit | c72f61c6d4dd779d61bd0ebc0b1211a84c5b9038 (patch) | |
tree | cab68e458106294731ccd5d3f2ad1f328000204a /testsuite/tests/rts/GcStaticPointers.hs | |
parent | 22bb78bb02718e162130690dfb9a11d7b719cea1 (diff) | |
download | haskell-c72f61c6d4dd779d61bd0ebc0b1211a84c5b9038.tar.gz |
Groom comments related to StaticPointers.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D575
Diffstat (limited to 'testsuite/tests/rts/GcStaticPointers.hs')
-rw-r--r-- | testsuite/tests/rts/GcStaticPointers.hs | 12 |
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) |