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

Data.BitArray.ST

Description

Mutable one-dimensional packed bit arrays in the (strict) ST monad.

Synopsis

Documentation

data STBitArray s #

newBitArray :: (Int, Int) -> Bool -> ST s (STBitArray s) #

readBit :: STBitArray s -> Int -> ST s Bool #

writeBit :: STBitArray s -> Int -> Bool -> ST s () #

flipBit :: STBitArray s -> Int -> ST s Bool #

flips the bit and returns the old value

unsafeWriteBit :: STBitArray s -> Int -> Bool -> ST s () #