summaryrefslogtreecommitdiff
path: root/libraries/ghc-heap/tests/heap_all.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ghc-heap/tests/heap_all.hs')
-rw-r--r--libraries/ghc-heap/tests/heap_all.hs19
1 files changed, 10 insertions, 9 deletions
diff --git a/libraries/ghc-heap/tests/heap_all.hs b/libraries/ghc-heap/tests/heap_all.hs
index 8cc9afce95..ac8953b5d2 100644
--- a/libraries/ghc-heap/tests/heap_all.hs
+++ b/libraries/ghc-heap/tests/heap_all.hs
@@ -12,7 +12,6 @@ import GHC.Int
import GHC.IO
import GHC.IORef
import GHC.MVar
-import GHC.Ptr
import GHC.Stack
import GHC.STRef
import GHC.Weak
@@ -177,7 +176,7 @@ exWord64Closure = Word64Closure
exAddrClosure :: Closure
exAddrClosure = AddrClosure
- { ptipe = PAddr, addrVal = nullPtr `plusPtr` 42 }
+ { ptipe = PAddr, addrVal = 42 }
exFloatClosure :: Closure
exFloatClosure = FloatClosure
@@ -317,17 +316,19 @@ main = do
assertClosuresEq exWordClosure
-- Primitive Int64
- let (I64# v) = 42
- getClosureData v >>=
- assertClosuresEq exInt64Closure
+ -- FAILING: On 64-bit platforms, v is a regular Int
+ -- let (I64# v) = 42
+ -- getClosureData v >>=
+ -- assertClosuresEq exInt64Closure
-- Primitive Word64
- let (W64# v) = 42
- getClosureData v >>=
- assertClosuresEq exWord64Closure
+ -- FAILING: On 64-bit platforms, v is a regular Word
+ -- let (W64# v) = 42
+ -- getClosureData v >>=
+ -- assertClosuresEq exWord64Closure
-- Primitive Addr
- let (Ptr v) = nullPtr `plusPtr` 42
+ let v = unsafeCoerce# 42# :: Addr#
getClosureData v >>=
assertClosuresEq exAddrClosure