bitarray-0.0.1.1: Mutable and immutable bit arrays
Safe HaskellNone
LanguageHaskell98

Data.BitArray

Description

Immutable one-dimensional packed bit arrays. The main advantage should be compactness in memory.

Synopsis

Documentation

data BitArray Source #

A packed bit array. Internally, it is represented as an unboxed array of Word64-s.

Instances

Instances details
Show BitArray Source # 
Instance details

Defined in Data.BitArray

Eq BitArray Source # 
Instance details

Defined in Data.BitArray

Ord BitArray Source # 
Instance details

Defined in Data.BitArray

Bit array construction / deconstruction

bitArray :: (Int, Int) -> [(Int, Bool)] -> BitArray Source #

Unspecified values become False.

bitArray' :: Bool -> (Int, Int) -> [(Int, Bool)] -> BitArray Source #

The first argument gives the default value (instead of False)

accumBitArray :: (Bool -> a -> Bool) -> Bool -> (Int, Int) -> [(Int, a)] -> BitArray Source #

listBitArray :: (Int, Int) -> [Bool] -> BitArray Source #

If the list is too short, the rest of the array is filled with False.

0/1 versions

Orphan instances

Show BitArray Source # 
Instance details

Eq BitArray Source # 
Instance details

Ord BitArray Source # 
Instance details