Since base-4.8.0.0 is
countLeadingZeros :: FiniteBits b => b -> Int
countTrailingZeros :: FiniteBits b => b -> Int
These indices are the most significant and least significant bits of the set, starting with the most significant and least significant ends, respectively. Subtract from finiteBitSize :: FiniteBits b => b -> Intto count from the other end.
source
share