Repository : ssh://darcs.haskell.org//srv/darcs/packages/integer-gmp

On branch  : ghc-7.2

http://hackage.haskell.org/trac/ghc/changeset/a9896df1364e3626ccf17efd79dc354226b41996

>---------------------------------------------------------------

commit a9896df1364e3626ccf17efd79dc354226b41996
Author: Ian Lynagh <[email protected]>
Date:   Sat Jul 23 13:31:07 2011 +0100

    Rename toInt# -> integerToInt for consistency

>---------------------------------------------------------------

 GHC/Integer.lhs |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/GHC/Integer.lhs b/GHC/Integer.lhs
index 4ca4cee..e0679e9 100644
--- a/GHC/Integer.lhs
+++ b/GHC/Integer.lhs
@@ -29,7 +29,7 @@
 
 module GHC.Integer (
     Integer,
-    smallInteger, wordToInteger, integerToWord, toInt#,
+    smallInteger, wordToInteger, integerToWord, integerToInt,
 #if WORD_SIZE_IN_BITS < 64
     integerToWord64, word64ToInteger,
     integerToInt64, int64ToInteger,
@@ -141,15 +141,15 @@ int64ToInteger i = if ((i `leInt64#` intToInt64# 
0x7FFFFFFF#) &&
           False && _ = False
 #endif
 
-toInt# :: Integer -> Int#
-{-# NOINLINE toInt# #-}
-{-# RULES "toInt#" forall i. toInt# (S# i) = i #-}
--- Don't inline toInt#, because it can't do much unless
+integerToInt :: Integer -> Int#
+{-# NOINLINE integerToInt #-}
+{-# RULES "integerToInt" forall i. integerToInt (S# i) = i #-}
+-- Don't inline integerToInt, because it can't do much unless
 -- it sees a (S# i), and inlining just creates fruitless
 -- join points.  But we do need a RULE to get the constants
 -- to work right:  1::Int had better optimise to (I# 1)!
-toInt# (S# i)   = i
-toInt# (J# s d) = integer2Int# s d
+integerToInt (S# i)   = i
+integerToInt (J# s d) = integer2Int# s d
 
 toBig :: Integer -> Integer
 toBig (S# i)     = case int2Integer# i of { (# s, d #) -> J# s d }
@@ -554,7 +554,7 @@ shiftRInteger (J# s d) i = case fdivQ2ExpInteger# s d i of
 -- given a suitable distribution of 'Integer' values.
 
 hashInteger :: Integer -> Int#
-hashInteger = toInt#
+hashInteger = integerToInt
                               
 \end{code}
 



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to