Module Astral_internal.Bitvector

type width := int
type t = int * width
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val width : t -> width
include Datatype_sig.PRINTABLE with type t := t
include Datatype_sig.SHOW with type t := t
val show : t -> string

String representation of type t

val pp : Stdlib.Format.formatter -> t -> unit

Output to formatter

val print : ?prefix:string -> t -> unit

Output to stdout.

val show_option : t option -> string
val print_option : ?prefix:string -> t option -> unit
val dump : string -> t -> unit

Dump to file given by filename

Lists of printable values

val show_list : ?separator:string -> t list -> string
val pp_list : Stdlib.Format.formatter -> t list -> unit
val print_list : ?separator:string -> ?prefix:string -> t list -> unit

Constructors

val of_int : int -> width -> t
val of_string : string -> t
val zero : width -> t
val one : width -> t
val full_zeros : width -> t
val full_ones : width -> t

Operations

val nth : t -> int -> bool

Conversions

val to_int : t -> int
val to_string : t -> string
val to_set : t -> t list