h$4 z      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN(c) Edward Kmett 2013-2014BSD3Edward Kmett  experimental non-portable TrustworthyObitsCalculate the least significant set bit using a debruijn multiplication table. NB:7 The result of this function is undefined when given 0.bits(Calculate the number of trailing 0 bits.bits&Calculate the number of leading zeros. bits'Calculate the most significant set bit. bitsA more concise version of complement zeroBits.2complement (zeroBits :: Word) == (oneBits :: Word)True2complement (oneBits :: Word) == (zeroBits :: Word)TrueNoteThe constraint on  : is arguably too strong. However, as some types (such as Natural) have undefined O , this is the only safe choice.bits A version of   that weakens the context from P to Q8. This is unsafe because there are some data types with Q instances that have undefined O , such as Natural. Nevertheless, it is sometimes useful to call this function on data types without P instances (e.g., R2), so this function is provided as a convenience.bits2Shift Right Logical (i.e., without sign extension)NB: When used on negative Rs, hilarity may ensue.   (c) Edward Kmett 2013BSD3Edward Kmett  experimental non-portable Safe-Inferred > bitsGet something from byte-aligned storage, starting on the next byte and discarding any left over bits in the buffer.NB: Using any operation from S other than checking T or U( will implicitly perform this operation.bitsGet# a single bit, consuming an entire byte if the bit buffer is emptybits0Emit any remaining contents from the bit buffer. Any use of the combinators from V (including W) will cause this to happen. bitsPut all the bits without a W!bitsPut" a single bit, emitting an entire byte if the bit buffer is full"bitsPut a (closed) range of bits#bits %putBitsFrom from b = putBits from 0 b  !"#  !"#BSD3 experimental non-portableNone Z/bitsElias Delta codes the position of the most significant bit in Elias 0.0bits;Elias Gamma codes the position of the most significant in 4.1bitsRepresentation for Elias 0 and / codes. A positive integer n is encoded by encoding the position of its most significant bit, and then the binary representation of the rest of the number.4bitsUnary-coded integers/runPutL . runEncode $ encode (Unary 1) >> flush"\128"/runPutL . runEncode $ encode (Unary 7) >> flush"\254"7bitsUnaligned codes/012345678:9;<78:94561230/;<      !"#$%&'()*+,-./012345667889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZXY[XY\X]^X]_bits-0.6-42OWe7HFfPfEuPol4ybymSData.Bits.ExtrasData.Bits.CodingData.Bits.Codedbase Data.BitszeroBitsRankedlsbranknlzlog2 word32Log2w8w16w32w64msb assignBitoneBits unsafeOneBitssrl $fRankedInt8 $fRankedInt16 $fRankedInt32 $fRankedInt64 $fRankedWord8$fRankedWord16$fRankedWord32$fRankedWord64Coding runCoding getAlignedgetBitgetBits getBitsFrom putAligned putUnalignedputBitputBits putBitsFrom$fMonadPutCoding$fMonadGetCoding$fMonadReadereCoding$fMonadStatesCoding$fMonadTransCoding$fMonadPlusCoding$fAlternativeCoding$fMonadFailCoding $fMonadCoding$fApplicativeCoding$fFunctorCodingDeltaGammaEliasunEliasUnaryunUnaryCodedencode encodeManydecode runEncode runDecode $fCodedUnary $fCodedElias $fEqElias $fOrdElias $fReadElias $fShowElias $fNumElias $fRealElias$fIntegralElias $fEnumElias $fEqUnary $fOrdUnary $fReadUnary $fShowUnary $fNumUnary$fIntegralUnary $fRealUnary $fEnumUnary complement FiniteBitsBitsinteger-wired-inGHC.Integer.TypeInteger#bytes-0.17.1-IXgPv29XziY89craG4K2EAData.Bytes.GetMonadGet remainingisEmptyData.Bytes.PutMonadPutflush