-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Mutable and immutable bit arrays -- @package bitarray @version 0.0.1.1 -- | Mutable one-dimensional packed bit arrays in the (strict) ST monad. module Data.BitArray.ST data STBitArray s getBitArrayBounds :: STBitArray s -> ST s (Int, Int) newBitArray :: (Int, Int) -> Bool -> ST s (STBitArray s) readBit :: STBitArray s -> Int -> ST s Bool writeBit :: STBitArray s -> Int -> Bool -> ST s () -- | flips the bit and returns the old value flipBit :: STBitArray s -> Int -> ST s Bool unsafeReadBit :: STBitArray s -> Int -> ST s Bool unsafeWriteBit :: STBitArray s -> Int -> Bool -> ST s () unsafeFlipBit :: STBitArray s -> Int -> ST s Bool thawBitArray :: BitArray -> ST s (STBitArray s) unsafeThawBitArray :: BitArray -> ST s (STBitArray s) freezeBitArray :: STBitArray s -> ST s BitArray unsafeFreezeBitArray :: STBitArray s -> ST s BitArray -- | Mutable one-dimensional packed bit arrays in the IO monad. module Data.BitArray.IO data IOBitArray getBitArrayBounds :: IOBitArray -> IO (Int, Int) newBitArray :: (Int, Int) -> Bool -> IO IOBitArray readBit :: IOBitArray -> Int -> IO Bool writeBit :: IOBitArray -> Int -> Bool -> IO () -- | flips the bit and returns the old value flipBit :: IOBitArray -> Int -> IO Bool unsafeReadBit :: IOBitArray -> Int -> IO Bool unsafeWriteBit :: IOBitArray -> Int -> Bool -> IO () unsafeFlipBit :: IOBitArray -> Int -> IO Bool thawBitArray :: BitArray -> IO IOBitArray unsafeThawBitArray :: BitArray -> IO IOBitArray freezeBitArray :: IOBitArray -> IO BitArray unsafeFreezeBitArray :: IOBitArray -> IO BitArray -- | Immutable one-dimensional packed bit arrays. The main advantage should -- be compactness in memory. module Data.BitArray -- | A packed bit array. Internally, it is represented as an unboxed array -- of Word64-s. data BitArray bitArrayBounds :: BitArray -> (Int, Int) lookupBit :: BitArray -> Int -> Bool unsafeLookupBit :: BitArray -> Int -> Bool -- | Unspecified values become False. bitArray :: (Int, Int) -> [(Int, Bool)] -> BitArray -- | The first argument gives the default value (instead of False) bitArray' :: Bool -> (Int, Int) -> [(Int, Bool)] -> BitArray accumBitArray :: (Bool -> a -> Bool) -> Bool -> (Int, Int) -> [(Int, a)] -> BitArray -- | If the list is too short, the rest of the array is filled with -- False. listBitArray :: (Int, Int) -> [Bool] -> BitArray bits :: BitArray -> [Bool] bits01 :: BitArray -> [Int] listBitArray01 :: (Int, Int) -> [Int] -> BitArray instance Show BitArray instance Ord BitArray instance Eq BitArray