diff options
author | Alexander Vershilov <alexander.vershilov@gmail.com> | 2015-01-12 05:29:18 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-01-13 10:10:38 -0600 |
commit | 7637810a93441d29bc84bbeeeced0615bbb9d9e4 (patch) | |
tree | 11e8a3d0a8f176aa7c1203beb713aa08b22f5959 /testsuite/tests/rts/ListStaticPointers.hs | |
parent | 099b76769f02432d8efcd7881348e5f5b6b50787 (diff) | |
download | haskell-7637810a93441d29bc84bbeeeced0615bbb9d9e4.tar.gz |
Trac #9878: Have StaticPointers support dynamic loading.
Summary:
A mutex is used to protect the SPT.
unsafeLookupStaticPtr and staticPtrKeys in GHC.StaticPtr are made
monadic.
SPT entries are removed in a destructor function of modules.
Authored-by: Facundo DomÃnguez <facundo.dominguez@tweag.io>
Authored-by: Alexander Vershilov <alexander.vershilov@tweag.io>
Test Plan: ./validate
Reviewers: austin, simonpj, hvr
Subscribers: carter, thomie, qnikst, mboes
Differential Revision: https://phabricator.haskell.org/D587
GHC Trac Issues: #9878
Diffstat (limited to 'testsuite/tests/rts/ListStaticPointers.hs')
-rw-r--r-- | testsuite/tests/rts/ListStaticPointers.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuite/tests/rts/ListStaticPointers.hs b/testsuite/tests/rts/ListStaticPointers.hs index 5ddb63613f..01c747d45a 100644 --- a/testsuite/tests/rts/ListStaticPointers.hs +++ b/testsuite/tests/rts/ListStaticPointers.hs @@ -7,10 +7,12 @@ import Data.List ((\\)) import GHC.StaticPtr import System.Exit -main = when (not $ eqBags staticPtrKeys expected) $ do - print ("expected", expected) - print ("found", staticPtrKeys) - exitFailure +main = do + found <- staticPtrKeys + when (not $ eqBags found expected) $ do + print ("expected", expected) + print ("found", found) + exitFailure where expected = |