[project @ 2000-03-22 12:01:57 by rrt]
[ghc-hetmet.git] / ghc / lib / std / PrelAddr.lhs
index 70f4a7c..3b9f77d 100644 (file)
@@ -15,6 +15,7 @@ module PrelAddr (
 
        , Word(..)
        , wordToInt
+       , intToWord
 
        , Word64(..)
        , Int64(..)
@@ -22,7 +23,6 @@ module PrelAddr (
 
 import PrelGHC
 import PrelBase
-import PrelCCall
 \end{code}
 
 \begin{code}
@@ -44,6 +44,9 @@ instance CReturnable Word
 wordToInt :: Word -> Int
 wordToInt (W# w#) = I# (word2Int# w#)
 
+intToWord :: Int -> Word
+intToWord (I# i#) = W# (int2Word# i#)
+
 #if WORD_SIZE_IN_BYTES == 8
 data Word64 = W64# Word#
 data Int64  = I64# Int#