Hardcaml.ConstantSourceRepresentation of variable width Constants and conversion to/from OCaml types.
include Bin_prot.Binable.S with type t := tinclude Bin_prot.Binable.S_only_functions with type t := tThis function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.
Convert a constant to a string of '1' and '0' chars.
Same as to_binary_string but adds '_'s every chars
Convert constant to an int32. Bits above Int32.num_bits are dropped.
Convert constant to an int64. Bits above Int64.num_bits are dropped.
Convert to array of int64s
Convert to an arbitrary precision integer.
Convert to a hex encoded string.
Convert a string containing '1' and '0' characters to a constant. Width is inferred from the strings length.
Same as of_binary_string but allow '_' chars
Create a constant from the given int32 value
Create a constant from the given int64 value
Create from an array of int64s
Create from a hex encoded string.
Create from an octal encoded string.
Create constant conversion functions from lists of some inner Bit.t type.