Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/8552953bea2c627318ffc319f447d3ee6691da11 >--------------------------------------------------------------- commit 8552953bea2c627318ffc319f447d3ee6691da11 Author: Johan Tibell <[email protected]> Date: Tue Feb 14 11:49:21 2012 -0800 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. >--------------------------------------------------------------- Data/Bits.hs | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Data/Bits.hs b/Data/Bits.hs index 496f592..9d8b60a 100644 --- a/Data/Bits.hs +++ b/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\" _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
