module CCBitField:sig
..end
This module defines efficient bitfields up to 30 or 62 bits (depending on the architecture) in a relatively type-safe way.
module B = CCBitField.Make(struct end);;
#install_printer B.pp;;
let x = B.mk_field ()
let y = B.mk_field ()
let z = B.mk_field ()
let f = B.empty |> B.set x true |> B.set y true;;
assert (not (B.get z f)) ;;
assert (f |> B.set z true |> B.get z);;
exception TooManyFields
exception Frozen
val max_width : int
module type S =sig
..end
module Make(
X
:
sig
end
)
:S