[Haskell-cafe] Implementations of bit vectors

Tomasz Zielonka tomasz.zielonka at gmail.com
Sat Nov 25 09:13:55 EST 2006


On Sat, Nov 25, 2006 at 10:41:56AM -0200, Maurí­cio wrote:
>   Does anyone knows of a nice implementation of bit vectors?
> I like the functions I see in Data.Bits (rotate, shift etc.),
> but that only works  with predefined sizes and I need a bit
> vector of exactly 33 bits.

Unboxed arrays (UArray, IOUArray, STUArray) of Bools work just like a
bit vector, with 8 elements packed in one byte.

Best regards
Tomasz


More information about the Haskell-Cafe mailing list