bitvec-0.2.0.0: Unboxed bit vectors

Safe HaskellNone
LanguageHaskell2010

Data.Bit

Synopsis

Documentation

newtype Bit Source #

A newtype wrapper with a custom instance of Data.Vector.Unboxed, which packs booleans as efficient as possible (8 values per byte). Vectors of Bit use 8x less memory than vectors of Bool (which stores one value per byte), but random writes are slightly slower.

In addition to Data.Vector.Unboxed interface, one can also find assorted utilities from Data.Vector.Unboxed.Bit and Data.Vector.Unboxed.Mutable.Bit.

Constructors

Bit 

Fields

Instances
Bounded Bit Source # 
Instance details

Defined in Data.Bit.Internal

Methods

minBound :: Bit #

maxBound :: Bit #

Enum Bit Source # 
Instance details

Defined in Data.Bit.Internal

Methods

succ :: Bit -> Bit #

pred :: Bit -> Bit #

toEnum :: Int -> Bit #

fromEnum :: Bit -> Int #

enumFrom :: Bit -> [Bit] #

enumFromThen :: Bit -> Bit -> [Bit] #

enumFromTo :: Bit -> Bit -> [Bit] #

enumFromThenTo :: Bit -> Bit -> Bit -> [Bit] #

Eq Bit Source # 
Instance details

Defined in Data.Bit.Internal

Methods

(==) :: Bit -> Bit -> Bool #

(/=) :: Bit -> Bit -> Bool #

Ord Bit Source # 
Instance details

Defined in Data.Bit.Internal

Methods

compare :: Bit -> Bit -> Ordering #

(<) :: Bit -> Bit -> Bool #

(<=) :: Bit -> Bit -> Bool #

(>) :: Bit -> Bit -> Bool #

(>=) :: Bit -> Bit -> Bool #

max :: Bit -> Bit -> Bit #

min :: Bit -> Bit -> Bit #

Read Bit Source # 
Instance details

Defined in Data.Bit.Internal

Show Bit Source # 
Instance details

Defined in Data.Bit.Internal

Methods

showsPrec :: Int -> Bit -> ShowS #

show :: Bit -> String #

showList :: [Bit] -> ShowS #

Bits Bit Source # 
Instance details

Defined in Data.Bit.Internal

Methods

(.&.) :: Bit -> Bit -> Bit #

(.|.) :: Bit -> Bit -> Bit #

xor :: Bit -> Bit -> Bit #

complement :: Bit -> Bit #

shift :: Bit -> Int -> Bit #

rotate :: Bit -> Int -> Bit #

zeroBits :: Bit #

bit :: Int -> Bit #

setBit :: Bit -> Int -> Bit #

clearBit :: Bit -> Int -> Bit #

complementBit :: Bit -> Int -> Bit #

testBit :: Bit -> Int -> Bool #

bitSizeMaybe :: Bit -> Maybe Int #

bitSize :: Bit -> Int #

isSigned :: Bit -> Bool #

shiftL :: Bit -> Int -> Bit #

unsafeShiftL :: Bit -> Int -> Bit #

shiftR :: Bit -> Int -> Bit #

unsafeShiftR :: Bit -> Int -> Bit #

rotateL :: Bit -> Int -> Bit #

rotateR :: Bit -> Int -> Bit #

popCount :: Bit -> Int #

FiniteBits Bit Source # 
Instance details

Defined in Data.Bit.Internal

Unbox Bit Source # 
Instance details

Defined in Data.Vector.Unboxed.Bit.Internal

Vector Vector Bit Source # 
Instance details

Defined in Data.Vector.Unboxed.Bit.Internal

MVector MVector Bit Source # 
Instance details

Defined in Data.Vector.Unboxed.Bit.Internal

data Vector Bit Source # 
Instance details

Defined in Data.Vector.Unboxed.Bit.Internal

data MVector s Bit Source # 
Instance details

Defined in Data.Vector.Unboxed.Bit.Internal