X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FBits.hs;h=eb8ace1bd90a8e4ff044fb123fa5730a1f440d75;hb=a70f356e023abdd0abb130cc149b0e3de7469044;hp=ded147a762993ac4a7a73247f437e338d483cbb7;hpb=47b53f7aa91d79eb538e14d4ccbf0ef9f25b7938;p=haskell-directory.git diff --git a/Data/Bits.hs b/Data/Bits.hs index ded147a..eb8ace1 100644 --- a/Data/Bits.hs +++ b/Data/Bits.hs @@ -9,11 +9,11 @@ -- Stability : experimental -- Portability : portable -- --- This module defines bitwise operations for signed and unsigned --- integers. Instances of the class 'Bits' for the 'Int' and --- 'Integer' types are available from this module, and instances for --- explicitly sized integral types are available from the --- "Data.Int" and "Data.Word" modules. +-- This module defines bitwise operations for signed and unsigned +-- integers. Instances of the class 'Bits' for the 'Int' and +-- 'Integer' types are available from this module, and instances for +-- explicitly sized integral types are available from the +-- "Data.Int" and "Data.Word" modules. -- ----------------------------------------------------------------------------- @@ -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#))