diff options
Diffstat (limited to 'libraries/integer-gmp/GHC')
| -rw-r--r-- | libraries/integer-gmp/GHC/Integer.lhs | 7 | ||||
| -rw-r--r-- | libraries/integer-gmp/GHC/Integer/Internals.hs | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/libraries/integer-gmp/GHC/Integer.lhs b/libraries/integer-gmp/GHC/Integer.lhs index 4d32d76245..424001cc88 100644 --- a/libraries/integer-gmp/GHC/Integer.lhs +++ b/libraries/integer-gmp/GHC/Integer.lhs @@ -68,15 +68,16 @@ import GHC.Integer.Internals ( int2Integer#, integer2Int#, word2Integer#, integer2Word#, andInteger#, orInteger#, xorInteger#, complementInteger#, #if WORD_SIZE_IN_BITS < 64 - int64ToInteger#, word64ToInteger#, + int64ToInteger#, integerToInt64#, + word64ToInteger#, integerToWord64#, #endif ) #if WORD_SIZE_IN_BITS < 64 import GHC.IntWord64 ( Int64#, Word64#, - int64ToWord64#, intToInt64#, integerToWord64#, - int64ToInt#, word64ToInt64#, integerToInt64#, + int64ToWord64#, intToInt64#, + int64ToInt#, word64ToInt64#, geInt64#, leInt64#, leWord64#, ) #endif diff --git a/libraries/integer-gmp/GHC/Integer/Internals.hs b/libraries/integer-gmp/GHC/Integer/Internals.hs index e0e87be6b2..a6262b8282 100644 --- a/libraries/integer-gmp/GHC/Integer/Internals.hs +++ b/libraries/integer-gmp/GHC/Integer/Internals.hs @@ -38,8 +38,8 @@ module GHC.Integer.Internals ( complementInteger#, #if WORD_SIZE_IN_BITS < 64 - int64ToInteger#, - word64ToInteger#, + int64ToInteger#, integerToInt64#, + word64ToInteger#, integerToWord64#, #endif #ifndef WORD_SIZE_IN_BITS @@ -190,4 +190,10 @@ foreign import prim "integer_cmm_int64ToIntegerzh" int64ToInteger# foreign import prim "integer_cmm_word64ToIntegerzh" word64ToInteger# :: Word64# -> (# Int#, ByteArray# #) + +foreign import ccall unsafe "hs_integerToInt64" + integerToInt64# :: Int# -> ByteArray# -> Int64# + +foreign import ccall unsafe "hs_integerToWord64" + integerToWord64# :: Int# -> ByteArray# -> Word64# #endif |
