X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FInt.hs;h=9f53937cc7ce9effc51bf6b7426f364e5c20fce5;hb=685432ac839f249ccd98bdf79fcf0c985872380b;hp=0c70d02ee74dfa3f99785df67bc587a7b462e6f8;hpb=2c8eb236a12a4f31a14d971bb84593bf1c32dc5f;p=ghc-base.git diff --git a/GHC/Int.hs b/GHC/Int.hs index 0c70d02..9f53937 100644 --- a/GHC/Int.hs +++ b/GHC/Int.hs @@ -147,10 +147,6 @@ instance Bits Int8 where bitSize _ = 8 isSigned _ = True - {-# INLINE shiftR #-} - -- same as the default definition, but we want it inlined (#2376) - x `shiftR` i = x `shift` (-i) - {-# RULES "fromIntegral/Int8->Int8" fromIntegral = id :: Int8 -> Int8 "fromIntegral/a->Int8" fromIntegral = \x -> case fromIntegral x of I# x# -> I8# (narrow8Int# x#) @@ -263,9 +259,6 @@ instance Bits Int16 where bitSize _ = 16 isSigned _ = True - {-# INLINE shiftR #-} - -- same as the default definition, but we want it inlined (#2376) - x `shiftR` i = x `shift` (-i) {-# RULES "fromIntegral/Word8->Int16" fromIntegral = \(W8# x#) -> I16# (word2Int# x#) @@ -399,9 +392,6 @@ instance Bits Int32 where bitSize _ = 32 isSigned _ = True - {-# INLINE shiftR #-} - -- same as the default definition, but we want it inlined (#2376) - x `shiftR` i = x `shift` (-i) {-# RULES "fromIntegral/Int->Int32" fromIntegral = \(I# x#) -> I32# (intToInt32# x#) @@ -512,10 +502,6 @@ instance Bits Int32 where bitSize _ = 32 isSigned _ = True - {-# INLINE shiftR #-} - -- same as the default definition, but we want it inlined (#2376) - x `shiftR` i = x `shift` (-i) - {-# RULES "fromIntegral/Word8->Int32" fromIntegral = \(W8# x#) -> I32# (word2Int# x#) "fromIntegral/Word16->Int32" fromIntegral = \(W16# x#) -> I32# (word2Int# x#) @@ -661,11 +647,6 @@ instance Bits Int64 where bitSize _ = 64 isSigned _ = True - {-# INLINE shiftR #-} - -- same as the default definition, but we want it inlined (#2376) - x `shiftR` i = x `shift` (-i) - - -- give the 64-bit shift operations the same treatment as the 32-bit -- ones (see GHC.Base), namely we wrap them in tests to catch the -- cases when we're shifting more than 64 bits to avoid unspecified @@ -779,10 +760,6 @@ instance Bits Int64 where bitSize _ = 64 isSigned _ = True - {-# INLINE shiftR #-} - -- same as the default definition, but we want it inlined (#2376) - x `shiftR` i = x `shift` (-i) - {-# RULES "fromIntegral/a->Int64" fromIntegral = \x -> case fromIntegral x of I# x# -> I64# x# "fromIntegral/Int64->a" fromIntegral = \(I64# x#) -> fromIntegral (I# x#)