diff options
-rw-r--r-- | libraries/base/Data/Bits.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index fd26d4e297..6379f208a8 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -168,10 +168,14 @@ class Eq a => Bits a where -- | @x \`complementBit\` i@ is the same as @x \`xor\` bit i@ complementBit :: a -> Int -> a - -- | Return 'True' if the @n@th bit of the argument is 1 - -- - -- Can be implemented using `testBitDefault' if @a@ is also an - -- instance of 'Num'. + {-| @x \`testBit\` i@ is the same as @x .&. bit n == 1@ + + In other words it returns True if the bit at offset @n + is set. + + Can be implemented using `testBitDefault' if @a@ is also an + instance of 'Num'. + -} testBit :: a -> Int -> Bool {-| Return the number of bits in the type of the argument. The actual |