diff options
-rw-r--r-- | libraries/base/GHC/Bits.hs | 1 | ||||
-rw-r--r-- | libraries/ghc-bignum/src/GHC/Num/Integer.hs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/GHC/Bits.hs b/libraries/base/GHC/Bits.hs index 0ea238b7bd..f35a72dc25 100644 --- a/libraries/base/GHC/Bits.hs +++ b/libraries/base/GHC/Bits.hs @@ -555,6 +555,7 @@ instance Bits Integer where zeroBits = integerZero setBit x i = integerSetBit x (fromIntegral i) clearBit x i = integerClearBit x (fromIntegral i) + {-# INLINE clearBit #-} complementBit x i = integerComplementBit x (fromIntegral i) bit (I# i) = integerBit# (int2Word# i) diff --git a/libraries/ghc-bignum/src/GHC/Num/Integer.hs b/libraries/ghc-bignum/src/GHC/Num/Integer.hs index 4d72c258c7..ed9b684d39 100644 --- a/libraries/ghc-bignum/src/GHC/Num/Integer.hs +++ b/libraries/ghc-bignum/src/GHC/Num/Integer.hs @@ -617,6 +617,7 @@ integerSetBit !i (W# n) = integerSetBit# i n -- -- @since 1.3 integerClearBit# :: Integer -> Word# -> Integer +{-# INLINE integerClearBit# #-} integerClearBit# n@(IS x) i | isTrue# (i `ltWord#` (WORD_SIZE_IN_BITS## `minusWord#` 1##)) = IS (x `andI#` notI# (uncheckedIShiftL# 1# (word2Int# i))) @@ -644,6 +645,7 @@ integerClearBit# (IN x) i = IN (bigNatAddWord# -- -- @since 1.3 integerClearBit :: Integer -> Word -> Integer +{-# INLINE integerClearBit #-} integerClearBit !i (W# n) = integerClearBit# i n -- | Reverse the /n/-th bit. |