diff options
Diffstat (limited to 'libraries/ghc-heap/tests/heap_all.hs')
-rw-r--r-- | libraries/ghc-heap/tests/heap_all.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libraries/ghc-heap/tests/heap_all.hs b/libraries/ghc-heap/tests/heap_all.hs index ac8953b5d2..482b424283 100644 --- a/libraries/ghc-heap/tests/heap_all.hs +++ b/libraries/ghc-heap/tests/heap_all.hs @@ -12,6 +12,7 @@ import GHC.Int import GHC.IO import GHC.IORef import GHC.MVar +import GHC.Ptr import GHC.Stack import GHC.STRef import GHC.Weak @@ -176,7 +177,7 @@ exWord64Closure = Word64Closure exAddrClosure :: Closure exAddrClosure = AddrClosure - { ptipe = PAddr, addrVal = 42 } + { ptipe = PAddr, addrVal = nullPtr `plusPtr` 42 } exFloatClosure :: Closure exFloatClosure = FloatClosure @@ -328,7 +329,7 @@ main = do -- assertClosuresEq exWord64Closure -- Primitive Addr - let v = unsafeCoerce# 42# :: Addr# + let (Ptr v) = nullPtr `plusPtr` 42 getClosureData v >>= assertClosuresEq exAddrClosure |