lsm-tree-0.1.0.0: Log-structured merge-trees
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.BloomFilter.Classic.BitArray

Description

Minimal bit array implementation.

Synopsis

Documentation

newtype BitArray Source #

Bit vector backed up by an array of Word64

This vector's offset and length are multiples of 64

Constructors

BitArray (PrimArray Word64) 

Instances

Instances details
Show BitArray Source # 
Instance details

Defined in Data.BloomFilter.Classic.BitArray

Eq BitArray Source # 
Instance details

Defined in Data.BloomFilter.Classic.BitArray

newtype MBitArray s Source #

new :: Int -> ST s (MBitArray s) Source #

Will create an explicitly pinned byte array. This is done because pinned byte arrays allow for more efficient serialisation, but the definition of isByteArrayPinned changed in GHC 9.6, see https://gitlab.haskell.org/ghc/ghc/-/issues/22255.

TODO: remove this workaround once a solution exists, e.g. a new primop that allows checking for implicit pinning.

unsafeSet :: MBitArray s -> Int -> ST s () Source #

deserialise :: PrimMonad m => MBitArray (PrimState m) -> (MutableByteArray (PrimState m) -> Int -> Int -> m ()) -> m () Source #

Do an inplace overwrite of the byte array representing the bit block.