projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove GADT refinements, part 5
[ghc-hetmet.git]
/
compiler
/
ghci
/
RtClosureInspect.hs
diff --git
a/compiler/ghci/RtClosureInspect.hs
b/compiler/ghci/RtClosureInspect.hs
index
b5d67cf
..
649e59d
100644
(file)
--- a/
compiler/ghci/RtClosureInspect.hs
+++ b/
compiler/ghci/RtClosureInspect.hs
@@
-54,8
+54,8
@@
import TcRnMonad
import TcType
import TcMType
import TcUnify
import TcType
import TcMType
import TcUnify
-import TcGadt
import TcEnv
import TcEnv
+import Unify
import DriverPhases
import TyCon
import Name
import DriverPhases
import TyCon
import Name
@@
-67,10
+67,14
@@
import TysPrim
import PrelNames
import TysWiredIn
import PrelNames
import TysWiredIn
-import Constants
import Outputable
import Outputable
+import FastString
import Panic
import Panic
+#ifndef GHCI_TABLES_NEXT_TO_CODE
+import Constants ( wORD_SIZE )
+#endif
+
import GHC.Arr ( Array(..) )
import GHC.Exts
import GHC.IOBase ( IO(IO) )
import GHC.Arr ( Array(..) )
import GHC.Exts
import GHC.IOBase ( IO(IO) )
@@
-260,11
+264,11
@@
extractUnboxed tt clos = go tt (nonPtrs clos)
| otherwise = pprPanic "Expected a TcTyCon" (ppr t)
go [] _ = []
go (t:tt) xx
| 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
= x : go tt rest
-sizeofTyCon :: TyCon -> Int
-sizeofTyCon = sizeofPrimRep . tyConPrimRep
+sizeofTyCon :: TyCon -> Int -- in *words*
+sizeofTyCon = primRepSizeW . tyConPrimRep
-----------------------------------
-- * Traversals for Terms
-----------------------------------
-- * Traversals for Terms