Support for using libffi to implement FFI calls in GHCi (#631)
[ghc-hetmet.git] / compiler / ghci / RtClosureInspect.hs
index b5d67cf..9e2ef17 100644 (file)
@@ -67,7 +67,6 @@ import TysPrim
 import PrelNames
 import TysWiredIn
 
-import Constants
 import Outputable
 import Panic
 
@@ -260,11 +259,11 @@ extractUnboxed tt clos = go tt (nonPtrs clos)
            | otherwise = pprPanic "Expected a TcTyCon" (ppr t)
          go [] _ = []
          go (t:tt) xx 
-           | (x, rest) <- splitAt ((sizeofType t + wORD_SIZE - 1) `div` wORD_SIZE) xx 
+           | (x, rest) <- splitAt (sizeofType t) xx
            = x : go tt rest
 
-sizeofTyCon :: TyCon -> Int
-sizeofTyCon = sizeofPrimRep . tyConPrimRep
+sizeofTyCon :: TyCon -> Int -- in *words*
+sizeofTyCon = primRepSizeW . tyConPrimRep
 
 -----------------------------------
 -- * Traversals for Terms