-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Simple bit vectors for Haskell
--
-- Simple bit vectors for Haskell
@package bit-vector
@version 0.1.0
module Data.Vector.Bit
-- | A BitVector is a little-endian Vector of Bools.
type BitVector = Vector Bool
-- | Converts an instance of Bits to a BitVector.
--
-- Note: this uses bitSize, and will not work for instances
-- which do not implement this method, notably Integer. To unpack
-- Integer values, use unpackInteger.
unpack :: Bits a => a -> BitVector
-- | Converts a BitVector to an instance of Bits.
pack :: Bits a => BitVector -> a
unpackInteger :: Integer -> BitVector
packInteger :: BitVector -> Integer
unpackInt :: Int -> BitVector
packInt :: BitVector -> Int
-- | Pads a BitVector to the specified length by adding a vector of
-- False values to the most-significant end.
pad :: Int -> BitVector -> BitVector
-- | Pads two BitVectors to the length of the longest vector. If the
-- vectors are the same length, padMax does nothing.
padMax :: BitVector -> BitVector -> (BitVector, BitVector)
-- | Like zip, except pads the vectors to equal length rather than
-- discarding elements of the longer vector.
zipPad :: BitVector -> BitVector -> Vector (Bool, Bool)
-- | Discards any False values at the most-significant end of the
-- given BitVector.
trimLeading :: BitVector -> BitVector
instance Bits BitVector
instance Num BitVector