import Prelude -- Just to get it in the dependencies
-import PrelGHC ( RealWorld, int2Word#, or#, and# )
+import PrelGHC ( RealWorld, or#, and# )
import PrelByteArr ( ByteArray, MutableByteArray,
newWordArray, readWordArray, newCharArray,
unsafeFreezeByteArray
constructErrorAndFail, constructErrorAndFailWithInfo,
IOError(IOError), IOErrorType(SystemError) )
import Time ( ClockTime(..) )
-import PrelAddr ( Addr, nullAddr, Word(..), wordToInt )
+import PrelAddr ( Addr, nullAddr, Word(..), wordToInt, intToWord )
#endif
\end{code}
unionFileMode = primOrWord
intersectFileMode = primAndWord
#else
---ToDo: tidy up.
-emptyFileMode = W# (int2Word# 0#)
+emptyFileMode = intToWord 0
unionFileMode = orWord
intersectFileMode = andWord
#endif
, Word(..)
, wordToInt
+ , intToWord
, Word64(..)
, Int64(..)
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#