import DataCon
import Type
import Var
-import TcRnMonad ( TcM, initTc, ioToTcRn,
- tryTcErrs, traceTc)
+import TcRnMonad
import TcType
import TcMType
import TcUnify
import PrelNames
import TysWiredIn
-import Constants
import Outputable
import Panic
+#ifndef GHCI_TABLES_NEXT_TO_CODE
+import Constants ( wORD_SIZE )
+#endif
+
import GHC.Arr ( Array(..) )
import GHC.Exts
-import GHC.IOBase
+import GHC.IOBase ( IO(IO) )
import Control.Monad
import Data.Maybe
| 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
traceTR = liftTcM . traceTc
trIO :: IO a -> TR a
-trIO = liftTcM . ioToTcRn
+trIO = liftTcM . liftIO
liftTcM :: TcM a -> TR a
liftTcM = id