Module type BitMaskSet.BitMask

Input signature for Make combining Storage with the actual details of a bitmask. See Make for details of its use.

include Storage
type storage

The storage type.

val zero : storage

The value for 0.

val one : storage

The value for 1.

val logand : storage -> storage -> storage

The land operator.

val logor : storage -> storage -> storage

The lor operator.

val lognot : storage -> storage

The lnot operator.

val shift_left : storage -> int -> storage

The lsl operator.

val shift_right_logical : storage -> int -> storage

The lsr operator.

val compare : storage -> storage -> int

The compare operator.

val toString : storage -> string

Conversion to string for the storage type.

type t

The (sum) type used for the elements in the bitmask. Constructors may include values, but the bitmask itself will only be over the constant constructors. Using a type whose underlying representation is not an integer will almost certainly cause segfaults. The sum type must have at least as many constant constructors as there are bits in the mask itself.

val mask : storage

Binary mask of valid bits.