Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64}
[ghc-base.git] / Data / Bits.hs
index 1c9cc4c..eb8ace1 100644 (file)
@@ -192,6 +192,8 @@ class Num a => Bits a where
     x `rotateR` i = x `rotate` (-i)
 
 instance Bits Int where
+    {-# INLINE shift #-}
+
 #ifdef __GLASGOW_HASKELL__
     (I# x#) .&.   (I# y#)  = I# (word2Int# (int2Word# x# `and#` int2Word# y#))
     (I# x#) .|.   (I# y#)  = I# (word2Int# (int2Word# x# `or#`  int2Word# y#))