diff options
| author | Ian Lynagh <igloo@earth.li> | 2009-06-15 20:17:32 +0000 |
|---|---|---|
| committer | Ian Lynagh <igloo@earth.li> | 2009-06-15 20:17:32 +0000 |
| commit | 819ff42e86b4cdd4c5ef7ad63553108bd379967c (patch) | |
| tree | 5048041b013b39764a4258b693b216d35e188591 /libraries/integer-gmp/GHC/Integer/Internals.hs | |
| parent | 060251c24ad160264ae8553efecbb8bed2f06360 (diff) | |
| download | haskell-819ff42e86b4cdd4c5ef7ad63553108bd379967c.tar.gz | |
Move the int64 conversion functions here, from ghc-prim
Diffstat (limited to 'libraries/integer-gmp/GHC/Integer/Internals.hs')
| -rw-r--r-- | libraries/integer-gmp/GHC/Integer/Internals.hs | 10 |
1 files changed, 8 insertions, 2 deletions
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 |
