[project @ 2002-05-10 20:44:29 by panne]
[ghc-hetmet.git] / ghc / compiler / ghci / ByteCodeItbls.lhs
index 7543aca..519e50c 100644 (file)
@@ -21,14 +21,18 @@ import ClosureInfo  ( mkVirtHeapOffsets )
 import FastString      ( FastString(..) )
 import Util             ( lengthIs, listLengthCmp )
 
-import Foreign         ( Storable(..), Word8, Word16, Word32, Word64, Ptr(..), 
+import Foreign         ( Storable(..), Word8, Word16, Word32, Word64,
                          malloc, castPtr, plusPtr )
 import Bits            ( Bits(..), shiftR )
 
 import Monad           ( liftM )
 
 import GlaExts         ( Int(I#), addr2Int# )
-import Ptr             ( Ptr(Ptr) )
+#if __GLASGOW_HASKELL__ < 503
+import Ptr             ( Ptr(..) )
+#else
+import GHC.Ptr         ( Ptr(..) )
+#endif
 \end{code}
 
 %************************************************************************
@@ -133,7 +137,7 @@ ptrToInt (Ptr a#) = I# (addr2Int# a#)
 
 type ItblCode = Word32
 mkJumpToAddr a
-   = let w32 = fromIntegral ()
+   = let w32 = fromIntegral (ptrToInt a)
 
          hi22, lo10 :: Word32 -> Word32
          lo10 x = x .&. 0x3FF