diff options
author | Johan Tibell <johan.tibell@gmail.com> | 2012-02-14 11:49:21 -0800 |
---|---|---|
committer | Johan Tibell <johan.tibell@gmail.com> | 2012-02-14 11:49:21 -0800 |
commit | 04a820683c0487474808cf92808d958d3415e9b3 (patch) | |
tree | 0ff1353bb6311c6379b7ed10351960d2a5862e88 | |
parent | 11f108bfbf783de618759f479f66820a2f640efb (diff) | |
download | haskell-04a820683c0487474808cf92808d958d3415e9b3.tar.gz |
Fix documentation of minimal complete definition of Bits instances
Added testBit, bit, and popCount to the required set. They no longer
have default implementations as the Num constraint was removed from the
Bits class.
-rw-r--r-- | libraries/base/Data/Bits.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index 496f592317..9d8b60ab96 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -75,7 +75,9 @@ The 'Bits' class defines bitwise operations over integral types. Minimal complete definition: '.&.', '.|.', 'xor', 'complement', ('shift' or ('shiftL' and 'shiftR')), ('rotate' or ('rotateL' and 'rotateR')), -'bitSize' and 'isSigned'. +'bitSize', 'isSigned', 'testBit', 'bit', and 'popCount'. The latter three can +be implemented using `testBitDefault', 'bitDefault, and 'popCountDefault', if +@a@ is also an instance of 'Num'. -} class Eq a => Bits a where -- | Bitwise \"and\" |