Safe Haskell | None |
---|---|
Language | Haskell2010 |
Some extra functionality for Bits instances, specifically an optimized version of findBits
on Natural
(using countTrailingZeros
).
Mainly exposed for testing purposes, but may be useful on its own.
Documentation
class Bits b => FindBits b where Source #
Nothing
findBits :: b -> [Int] Source #
list of all set bits in a value
default findBits :: FiniteBits b => b -> [Int] Source #