X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Flib%2Fstd%2FPrelAddr.lhs;h=3b9f77d95d5bdce741cd496c069c48ec257fbcee;hb=712a982fd4d9bad19c8e4ba7cd5ce5a6b4f8e954;hp=70f4a7c0686f64fed88fcb8b0f7681708b03c6a4;hpb=d3aa7046cf134bf972551dbfd8ae561a0dbc07bc;p=ghc-hetmet.git diff --git a/ghc/lib/std/PrelAddr.lhs b/ghc/lib/std/PrelAddr.lhs index 70f4a7c..3b9f77d 100644 --- a/ghc/lib/std/PrelAddr.lhs +++ b/ghc/lib/std/PrelAddr.lhs @@ -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#