Module Bap_c_type

C Type System.

We represent a C type structurally, i.e., the type representation is self-containted and doesn't require any typing requirement.

Polymorphic variants are used to represent C type constructors and type groups.

The type system is extended with attributes, i.e., it is possible to attach attributes of the form attr(args) to C type declarations.

type char = [
  1. | `schar
  2. | `char
  3. | `uchar
]
val bin_shape_char : Core_kernel.Bin_prot.Shape.t
val bin_size_char : char Core_kernel.Bin_prot.Size.sizer
val bin_write_char : char Core_kernel.Bin_prot.Write.writer
val bin_writer_char : char Core_kernel.Bin_prot.Type_class.writer
val bin_read_char : char Core_kernel.Bin_prot.Read.reader
val __bin_read_char__ : (int -> char) Core_kernel.Bin_prot.Read.reader
val bin_reader_char : char Core_kernel.Bin_prot.Type_class.reader
val bin_char : char Core_kernel.Bin_prot.Type_class.t
val compare_char : char -> char -> int
val sexp_of_char : char -> Ppx_sexp_conv_lib.Sexp.t
val char_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> char
val __char_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> char
val all_of_char : char list
type short = [
  1. | `sshort
  2. | `ushort
]
val bin_shape_short : Core_kernel.Bin_prot.Shape.t
val bin_size_short : short Core_kernel.Bin_prot.Size.sizer
val bin_write_short : short Core_kernel.Bin_prot.Write.writer
val bin_writer_short : short Core_kernel.Bin_prot.Type_class.writer
val bin_read_short : short Core_kernel.Bin_prot.Read.reader
val __bin_read_short__ : (int -> short) Core_kernel.Bin_prot.Read.reader
val bin_reader_short : short Core_kernel.Bin_prot.Type_class.reader
val bin_short : short Core_kernel.Bin_prot.Type_class.t
val compare_short : short -> short -> int
val sexp_of_short : short -> Ppx_sexp_conv_lib.Sexp.t
val short_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> short
val __short_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> short
val all_of_short : short list
type cint = [
  1. | `uint
  2. | `sint
]
val bin_shape_cint : Core_kernel.Bin_prot.Shape.t
val bin_size_cint : cint Core_kernel.Bin_prot.Size.sizer
val bin_write_cint : cint Core_kernel.Bin_prot.Write.writer
val bin_writer_cint : cint Core_kernel.Bin_prot.Type_class.writer
val bin_read_cint : cint Core_kernel.Bin_prot.Read.reader
val __bin_read_cint__ : (int -> cint) Core_kernel.Bin_prot.Read.reader
val bin_reader_cint : cint Core_kernel.Bin_prot.Type_class.reader
val bin_cint : cint Core_kernel.Bin_prot.Type_class.t
val compare_cint : cint -> cint -> int
val sexp_of_cint : cint -> Ppx_sexp_conv_lib.Sexp.t
val cint_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> cint
val __cint_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> cint
val all_of_cint : cint list
type long = [
  1. | `slong
  2. | `ulong
]
val bin_shape_long : Core_kernel.Bin_prot.Shape.t
val bin_size_long : long Core_kernel.Bin_prot.Size.sizer
val bin_write_long : long Core_kernel.Bin_prot.Write.writer
val bin_writer_long : long Core_kernel.Bin_prot.Type_class.writer
val bin_read_long : long Core_kernel.Bin_prot.Read.reader
val __bin_read_long__ : (int -> long) Core_kernel.Bin_prot.Read.reader
val bin_reader_long : long Core_kernel.Bin_prot.Type_class.reader
val bin_long : long Core_kernel.Bin_prot.Type_class.t
val compare_long : long -> long -> int
val sexp_of_long : long -> Ppx_sexp_conv_lib.Sexp.t
val long_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> long
val __long_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> long
val all_of_long : long list
type long_long = [
  1. | `slong_long
  2. | `ulong_long
]
val bin_shape_long_long : Core_kernel.Bin_prot.Shape.t
val bin_size_long_long : long_long Core_kernel.Bin_prot.Size.sizer
val bin_write_long_long : long_long Core_kernel.Bin_prot.Write.writer
val bin_writer_long_long : long_long Core_kernel.Bin_prot.Type_class.writer
val bin_read_long_long : long_long Core_kernel.Bin_prot.Read.reader
val __bin_read_long_long__ : (int -> long_long) Core_kernel.Bin_prot.Read.reader
val bin_reader_long_long : long_long Core_kernel.Bin_prot.Type_class.reader
val bin_long_long : long_long Core_kernel.Bin_prot.Type_class.t
val compare_long_long : long_long -> long_long -> int
val sexp_of_long_long : long_long -> Ppx_sexp_conv_lib.Sexp.t
val long_long_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> long_long
val __long_long_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> long_long
val all_of_long_long : long_long list
type signed = [
  1. | `schar
  2. | `sshort
  3. | `sint
  4. | `slong
  5. | `slong_long
]
val bin_shape_signed : Core_kernel.Bin_prot.Shape.t
val bin_size_signed : signed Core_kernel.Bin_prot.Size.sizer
val bin_write_signed : signed Core_kernel.Bin_prot.Write.writer
val bin_writer_signed : signed Core_kernel.Bin_prot.Type_class.writer
val bin_read_signed : signed Core_kernel.Bin_prot.Read.reader
val __bin_read_signed__ : (int -> signed) Core_kernel.Bin_prot.Read.reader
val bin_reader_signed : signed Core_kernel.Bin_prot.Type_class.reader
val bin_signed : signed Core_kernel.Bin_prot.Type_class.t
val compare_signed : signed -> signed -> int
val sexp_of_signed : signed -> Ppx_sexp_conv_lib.Sexp.t
val signed_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> signed
val __signed_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> signed
val all_of_signed : signed list
type unsigned = [
  1. | `bool
  2. | `uchar
  3. | `ushort
  4. | `uint
  5. | `ulong
  6. | `ulong_long
]
val bin_shape_unsigned : Core_kernel.Bin_prot.Shape.t
val bin_size_unsigned : unsigned Core_kernel.Bin_prot.Size.sizer
val bin_write_unsigned : unsigned Core_kernel.Bin_prot.Write.writer
val bin_writer_unsigned : unsigned Core_kernel.Bin_prot.Type_class.writer
val bin_read_unsigned : unsigned Core_kernel.Bin_prot.Read.reader
val __bin_read_unsigned__ : (int -> unsigned) Core_kernel.Bin_prot.Read.reader
val bin_reader_unsigned : unsigned Core_kernel.Bin_prot.Type_class.reader
val bin_unsigned : unsigned Core_kernel.Bin_prot.Type_class.t
val compare_unsigned : unsigned -> unsigned -> int
val sexp_of_unsigned : unsigned -> Ppx_sexp_conv_lib.Sexp.t
val unsigned_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> unsigned
val __unsigned_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> unsigned
val all_of_unsigned : unsigned list
type enum = [
  1. | `enum of (string * int64 option) list
]
val bin_shape_enum : Core_kernel.Bin_prot.Shape.t
val bin_size_enum : enum Core_kernel.Bin_prot.Size.sizer
val bin_write_enum : enum Core_kernel.Bin_prot.Write.writer
val bin_writer_enum : enum Core_kernel.Bin_prot.Type_class.writer
val bin_read_enum : enum Core_kernel.Bin_prot.Read.reader
val __bin_read_enum__ : (int -> enum) Core_kernel.Bin_prot.Read.reader
val bin_reader_enum : enum Core_kernel.Bin_prot.Type_class.reader
val bin_enum : enum Core_kernel.Bin_prot.Type_class.t
val compare_enum : enum -> enum -> int
val sexp_of_enum : enum -> Ppx_sexp_conv_lib.Sexp.t
val enum_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> enum
val __enum_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> enum
type integer = [
  1. | char
  2. | signed
  3. | unsigned
  4. | enum
]
val bin_shape_integer : Core_kernel.Bin_prot.Shape.t
val bin_size_integer : integer Core_kernel.Bin_prot.Size.sizer
val bin_write_integer : integer Core_kernel.Bin_prot.Write.writer
val bin_writer_integer : integer Core_kernel.Bin_prot.Type_class.writer
val bin_read_integer : integer Core_kernel.Bin_prot.Read.reader
val __bin_read_integer__ : (int -> integer) Core_kernel.Bin_prot.Read.reader
val bin_reader_integer : integer Core_kernel.Bin_prot.Type_class.reader
val bin_integer : integer Core_kernel.Bin_prot.Type_class.t
val compare_integer : integer -> integer -> int
val sexp_of_integer : integer -> Ppx_sexp_conv_lib.Sexp.t
val integer_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> integer
val __integer_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> integer
type real = [
  1. | `float
  2. | `double
  3. | `long_double
]
val bin_shape_real : Core_kernel.Bin_prot.Shape.t
val bin_size_real : real Core_kernel.Bin_prot.Size.sizer
val bin_write_real : real Core_kernel.Bin_prot.Write.writer
val bin_writer_real : real Core_kernel.Bin_prot.Type_class.writer
val bin_read_real : real Core_kernel.Bin_prot.Read.reader
val __bin_read_real__ : (int -> real) Core_kernel.Bin_prot.Read.reader
val bin_reader_real : real Core_kernel.Bin_prot.Type_class.reader
val bin_real : real Core_kernel.Bin_prot.Type_class.t
val compare_real : real -> real -> int
val sexp_of_real : real -> Ppx_sexp_conv_lib.Sexp.t
val real_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> real
val __real_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> real
val all_of_real : real list
type complex = [
  1. | `cfloat
  2. | `cdouble
  3. | `clong_double
]
val bin_shape_complex : Core_kernel.Bin_prot.Shape.t
val bin_size_complex : complex Core_kernel.Bin_prot.Size.sizer
val bin_write_complex : complex Core_kernel.Bin_prot.Write.writer
val bin_writer_complex : complex Core_kernel.Bin_prot.Type_class.writer
val bin_read_complex : complex Core_kernel.Bin_prot.Read.reader
val __bin_read_complex__ : (int -> complex) Core_kernel.Bin_prot.Read.reader
val bin_reader_complex : complex Core_kernel.Bin_prot.Type_class.reader
val bin_complex : complex Core_kernel.Bin_prot.Type_class.t
val compare_complex : complex -> complex -> int
val sexp_of_complex : complex -> Ppx_sexp_conv_lib.Sexp.t
val complex_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> complex
val __complex_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> complex
val all_of_complex : complex list
type floating = [
  1. | real
  2. | complex
]
val bin_shape_floating : Core_kernel.Bin_prot.Shape.t
val bin_size_floating : floating Core_kernel.Bin_prot.Size.sizer
val bin_write_floating : floating Core_kernel.Bin_prot.Write.writer
val bin_writer_floating : floating Core_kernel.Bin_prot.Type_class.writer
val bin_read_floating : floating Core_kernel.Bin_prot.Read.reader
val __bin_read_floating__ : (int -> floating) Core_kernel.Bin_prot.Read.reader
val bin_reader_floating : floating Core_kernel.Bin_prot.Type_class.reader
val bin_floating : floating Core_kernel.Bin_prot.Type_class.t
val compare_floating : floating -> floating -> int
val sexp_of_floating : floating -> Ppx_sexp_conv_lib.Sexp.t
val floating_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> floating
val __floating_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> floating
val all_of_floating : floating list
type basic = [
  1. | integer
  2. | floating
]
val bin_shape_basic : Core_kernel.Bin_prot.Shape.t
val bin_size_basic : basic Core_kernel.Bin_prot.Size.sizer
val bin_write_basic : basic Core_kernel.Bin_prot.Write.writer
val bin_writer_basic : basic Core_kernel.Bin_prot.Type_class.writer
val bin_read_basic : basic Core_kernel.Bin_prot.Read.reader
val __bin_read_basic__ : (int -> basic) Core_kernel.Bin_prot.Read.reader
val bin_reader_basic : basic Core_kernel.Bin_prot.Type_class.reader
val bin_basic : basic Core_kernel.Bin_prot.Type_class.t
val compare_basic : basic -> basic -> int
val sexp_of_basic : basic -> Ppx_sexp_conv_lib.Sexp.t
val basic_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> basic
val __basic_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> basic
type cv = unit
val bin_shape_cv : Core_kernel.Bin_prot.Shape.t
val bin_size_cv : cv Core_kernel.Bin_prot.Size.sizer
val bin_write_cv : cv Core_kernel.Bin_prot.Write.writer
val bin_writer_cv : cv Core_kernel.Bin_prot.Type_class.writer
val bin_read_cv : cv Core_kernel.Bin_prot.Read.reader
val __bin_read_cv__ : (int -> cv) Core_kernel.Bin_prot.Read.reader
val bin_reader_cv : cv Core_kernel.Bin_prot.Type_class.reader
val bin_cv : cv Core_kernel.Bin_prot.Type_class.t
val compare_cv : cv -> cv -> int
val sexp_of_cv : cv -> Ppx_sexp_conv_lib.Sexp.t
val cv_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> cv
type cvr = Core_kernel.Bool.t
val bin_shape_cvr : Core_kernel.Bin_prot.Shape.t
val bin_size_cvr : cvr Core_kernel.Bin_prot.Size.sizer
val bin_write_cvr : cvr Core_kernel.Bin_prot.Write.writer
val bin_writer_cvr : cvr Core_kernel.Bin_prot.Type_class.writer
val bin_read_cvr : cvr Core_kernel.Bin_prot.Read.reader
val __bin_read_cvr__ : (int -> cvr) Core_kernel.Bin_prot.Read.reader
val bin_reader_cvr : cvr Core_kernel.Bin_prot.Type_class.reader
val bin_cvr : cvr Core_kernel.Bin_prot.Type_class.t
val compare_cvr : cvr -> cvr -> int
val sexp_of_cvr : cvr -> Ppx_sexp_conv_lib.Sexp.t
val cvr_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> cvr
module Qualifier : sig ... end
type 'a qualifier = 'a Qualifier.t
val bin_shape_qualifier : Core_kernel.Bin_prot.Shape.t -> Core_kernel.Bin_prot.Shape.t
val bin_size_qualifier : 'a Core_kernel.Bin_prot.Size.sizer -> 'a qualifier Core_kernel.Bin_prot.Size.sizer
val bin_write_qualifier : 'a Core_kernel.Bin_prot.Write.writer -> 'a qualifier Core_kernel.Bin_prot.Write.writer
val bin_writer_qualifier : 'a Core_kernel.Bin_prot.Type_class.writer -> 'a qualifier Core_kernel.Bin_prot.Type_class.writer
val bin_read_qualifier : 'a Core_kernel.Bin_prot.Read.reader -> 'a qualifier Core_kernel.Bin_prot.Read.reader
val __bin_read_qualifier__ : 'a Core_kernel.Bin_prot.Read.reader -> (int -> 'a qualifier) Core_kernel.Bin_prot.Read.reader
val bin_reader_qualifier : 'a Core_kernel.Bin_prot.Type_class.reader -> 'a qualifier Core_kernel.Bin_prot.Type_class.reader
val bin_qualifier : 'a Core_kernel.Bin_prot.Type_class.t -> 'a qualifier Core_kernel.Bin_prot.Type_class.t
val compare_qualifier : ('a -> 'a -> int) -> 'a qualifier -> 'a qualifier -> int
val sexp_of_qualifier : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a qualifier -> Ppx_sexp_conv_lib.Sexp.t
val qualifier_of_sexp : (Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Ppx_sexp_conv_lib.Sexp.t -> 'a qualifier
module Attr : sig ... end
type attr = Attr.t
val bin_shape_attr : Core_kernel.Bin_prot.Shape.t
val bin_size_attr : attr Core_kernel.Bin_prot.Size.sizer
val bin_write_attr : attr Core_kernel.Bin_prot.Write.writer
val bin_writer_attr : attr Core_kernel.Bin_prot.Type_class.writer
val bin_read_attr : attr Core_kernel.Bin_prot.Read.reader
val __bin_read_attr__ : (int -> attr) Core_kernel.Bin_prot.Read.reader
val bin_reader_attr : attr Core_kernel.Bin_prot.Type_class.reader
val bin_attr : attr Core_kernel.Bin_prot.Type_class.t
val compare_attr : attr -> attr -> int
val sexp_of_attr : attr -> Ppx_sexp_conv_lib.Sexp.t
val attr_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> attr
module Spec : sig ... end
type ('a, 'b) spec = ('a, 'b) Spec.t
val bin_shape_spec : Core_kernel.Bin_prot.Shape.t -> Core_kernel.Bin_prot.Shape.t -> Core_kernel.Bin_prot.Shape.t
val bin_size_spec : 'a Core_kernel.Bin_prot.Size.sizer -> 'b Core_kernel.Bin_prot.Size.sizer -> ('a, 'b) spec Core_kernel.Bin_prot.Size.sizer
val bin_write_spec : 'a Core_kernel.Bin_prot.Write.writer -> 'b Core_kernel.Bin_prot.Write.writer -> ('a, 'b) spec Core_kernel.Bin_prot.Write.writer
val bin_writer_spec : 'a Core_kernel.Bin_prot.Type_class.writer -> 'b Core_kernel.Bin_prot.Type_class.writer -> ('a, 'b) spec Core_kernel.Bin_prot.Type_class.writer
val bin_read_spec : 'a Core_kernel.Bin_prot.Read.reader -> 'b Core_kernel.Bin_prot.Read.reader -> ('a, 'b) spec Core_kernel.Bin_prot.Read.reader
val __bin_read_spec__ : 'a Core_kernel.Bin_prot.Read.reader -> 'b Core_kernel.Bin_prot.Read.reader -> (int -> ('a, 'b) spec) Core_kernel.Bin_prot.Read.reader
val bin_reader_spec : 'a Core_kernel.Bin_prot.Type_class.reader -> 'b Core_kernel.Bin_prot.Type_class.reader -> ('a, 'b) spec Core_kernel.Bin_prot.Type_class.reader
val bin_spec : 'a Core_kernel.Bin_prot.Type_class.t -> 'b Core_kernel.Bin_prot.Type_class.t -> ('a, 'b) spec Core_kernel.Bin_prot.Type_class.t
val compare_spec : ('a -> 'a -> int) -> ('b -> 'b -> int) -> ('a, 'b) spec -> ('a, 'b) spec -> int
val sexp_of_spec : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> ('b -> Ppx_sexp_conv_lib.Sexp.t) -> ('a, 'b) spec -> Ppx_sexp_conv_lib.Sexp.t
val spec_of_sexp : (Ppx_sexp_conv_lib.Sexp.t -> 'a) -> (Ppx_sexp_conv_lib.Sexp.t -> 'b) -> Ppx_sexp_conv_lib.Sexp.t -> ('a, 'b) spec
type no_qualifier = [
  1. | `no_qualifier
]
val bin_shape_no_qualifier : Core_kernel.Bin_prot.Shape.t
val bin_size_no_qualifier : no_qualifier Core_kernel.Bin_prot.Size.sizer
val bin_write_no_qualifier : no_qualifier Core_kernel.Bin_prot.Write.writer
val bin_writer_no_qualifier : no_qualifier Core_kernel.Bin_prot.Type_class.writer
val bin_read_no_qualifier : no_qualifier Core_kernel.Bin_prot.Read.reader
val __bin_read_no_qualifier__ : (int -> no_qualifier) Core_kernel.Bin_prot.Read.reader
val bin_reader_no_qualifier : no_qualifier Core_kernel.Bin_prot.Type_class.reader
val bin_no_qualifier : no_qualifier Core_kernel.Bin_prot.Type_class.t
val compare_no_qualifier : no_qualifier -> no_qualifier -> int
val sexp_of_no_qualifier : no_qualifier -> Ppx_sexp_conv_lib.Sexp.t
val no_qualifier_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> no_qualifier
val __no_qualifier_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> no_qualifier
module Proto : sig ... end
module Compound : sig ... end
module Array : sig ... end
type t = [
  1. | `Void
  2. | `Basic of (cv qualifier, basic) spec
  3. | `Pointer of (cvr qualifier, t) spec
  4. | `Array of (cvr qualifier, array) spec
  5. | `Structure of (no_qualifier, compound) spec
  6. | `Union of (no_qualifier, compound) spec
  7. | `Function of (no_qualifier, proto) spec
]
and proto = t Proto.t
and compound = t Compound.t
and array = t Array.t
val bin_shape_t : Core_kernel.Bin_prot.Shape.t
val bin_shape_proto : Core_kernel.Bin_prot.Shape.t
val bin_shape_compound : Core_kernel.Bin_prot.Shape.t
val bin_shape_array : Core_kernel.Bin_prot.Shape.t
val bin_size_t : t Core_kernel.Bin_prot.Size.sizer
val bin_write_t : t Core_kernel.Bin_prot.Write.writer
val bin_writer_t : t Core_kernel.Bin_prot.Type_class.writer
val bin_size_proto : proto Core_kernel.Bin_prot.Size.sizer
val bin_write_proto : proto Core_kernel.Bin_prot.Write.writer
val bin_writer_proto : proto Core_kernel.Bin_prot.Type_class.writer
val bin_size_compound : compound Core_kernel.Bin_prot.Size.sizer
val bin_write_compound : compound Core_kernel.Bin_prot.Write.writer
val bin_writer_compound : compound Core_kernel.Bin_prot.Type_class.writer
val bin_size_array : array Core_kernel.Bin_prot.Size.sizer
val bin_write_array : array Core_kernel.Bin_prot.Write.writer
val bin_writer_array : array Core_kernel.Bin_prot.Type_class.writer
val bin_read_t : t Core_kernel.Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Core_kernel.Bin_prot.Read.reader
val bin_reader_t : t Core_kernel.Bin_prot.Type_class.reader
val bin_read_proto : proto Core_kernel.Bin_prot.Read.reader
val __bin_read_proto__ : (int -> proto) Core_kernel.Bin_prot.Read.reader
val bin_reader_proto : proto Core_kernel.Bin_prot.Type_class.reader
val bin_read_compound : compound Core_kernel.Bin_prot.Read.reader
val __bin_read_compound__ : (int -> compound) Core_kernel.Bin_prot.Read.reader
val bin_reader_compound : compound Core_kernel.Bin_prot.Type_class.reader
val bin_read_array : array Core_kernel.Bin_prot.Read.reader
val __bin_read_array__ : (int -> array) Core_kernel.Bin_prot.Read.reader
val bin_reader_array : array Core_kernel.Bin_prot.Type_class.reader
val bin_t : t Core_kernel.Bin_prot.Type_class.t
val bin_proto : proto Core_kernel.Bin_prot.Type_class.t
val bin_compound : compound Core_kernel.Bin_prot.Type_class.t
val bin_array : array Core_kernel.Bin_prot.Type_class.t
val compare : t -> t -> int
val compare_proto : proto -> proto -> int
val compare_compound : compound -> compound -> int
val compare_array : array -> array -> int
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_proto : proto -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_compound : compound -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_array : array -> Ppx_sexp_conv_lib.Sexp.t
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val __t_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> t
val proto_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> proto
val compound_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> compound
val array_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> array
type scalar = [
  1. | `Basic of (cv qualifier, basic) spec
  2. | `Pointer of (cvr qualifier, t) spec
]
val bin_shape_scalar : Core_kernel.Bin_prot.Shape.t
val bin_size_scalar : scalar Core_kernel.Bin_prot.Size.sizer
val bin_write_scalar : scalar Core_kernel.Bin_prot.Write.writer
val bin_writer_scalar : scalar Core_kernel.Bin_prot.Type_class.writer
val bin_read_scalar : scalar Core_kernel.Bin_prot.Read.reader
val __bin_read_scalar__ : (int -> scalar) Core_kernel.Bin_prot.Read.reader
val bin_reader_scalar : scalar Core_kernel.Bin_prot.Type_class.reader
val bin_scalar : scalar Core_kernel.Bin_prot.Type_class.t
val compare_scalar : scalar -> scalar -> int
val sexp_of_scalar : scalar -> Ppx_sexp_conv_lib.Sexp.t
val scalar_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> scalar
val __scalar_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> scalar
type aggregate = [
  1. | `Array of (no_qualifier, t) spec
  2. | `Structure of (no_qualifier, t list) spec
]
val bin_shape_aggregate : Core_kernel.Bin_prot.Shape.t
val bin_size_aggregate : aggregate Core_kernel.Bin_prot.Size.sizer
val bin_write_aggregate : aggregate Core_kernel.Bin_prot.Write.writer
val bin_writer_aggregate : aggregate Core_kernel.Bin_prot.Type_class.writer
val bin_read_aggregate : aggregate Core_kernel.Bin_prot.Read.reader
val __bin_read_aggregate__ : (int -> aggregate) Core_kernel.Bin_prot.Read.reader
val bin_reader_aggregate : aggregate Core_kernel.Bin_prot.Type_class.reader
val bin_aggregate : aggregate Core_kernel.Bin_prot.Type_class.t
val compare_aggregate : aggregate -> aggregate -> int
val sexp_of_aggregate : aggregate -> Ppx_sexp_conv_lib.Sexp.t
val aggregate_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> aggregate
val __aggregate_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> aggregate
val attrs : t -> attr list

attrs t the list of attributes associated with the type t.

val is_const : t -> Core_kernel.Bool.t

is_const t is true if type is const-qualified.

val is_volatile : t -> Core_kernel.Bool.t

is_volatile t is true if type is volatile-qualified.

val is_restrict : t -> Core_kernel.Bool.t

is_restrict t is true if type is restrict-qualified.

val is_void : t -> Core_kernel.Bool.t

is_void t true iff t is `Void

Basic Types

val basic : ?attrs:attr list -> ?const:Core_kernel.Bool.t -> ?volatile:Core_kernel.Bool.t -> basic -> t

basic x constructs a basic type.

Example, basic `char. All parameters default to false or empty.

  • since 2.5.0
val is_basic : t -> Core_kernel.Bool.t
val is_char : t -> Core_kernel.Bool.t
val is_short : t -> Core_kernel.Bool.t
val is_cint : t -> Core_kernel.Bool.t
val is_signed : t -> Core_kernel.Bool.t
val is_unsigned : t -> Core_kernel.Bool.t
val is_enum : t -> Core_kernel.Bool.t
val is_integer : t -> Core_kernel.Bool.t
val is_real : t -> Core_kernel.Bool.t
val is_complex : t -> Core_kernel.Bool.t
val is_floating : t -> Core_kernel.Bool.t

Pointers and Arrays

val pointer : ?attrs:attr list -> ?const:Core_kernel.Bool.t -> ?volatile:Core_kernel.Bool.t -> ?restrict:Core_kernel.Bool.t -> t -> t

pointer t constructs a pointer to the type t.

val array : ?attrs:attr list -> ?const:Core_kernel.Bool.t -> ?volatile:Core_kernel.Bool.t -> ?restrict:Core_kernel.Bool.t -> ?size:Core_kernel.Int.t -> t -> t

array t constructs an array of type t elements.

The size is the optional size (the number of elements) of the array.

val is_array : t -> Core_kernel.Bool.t
val is_pointer : t -> Core_kernel.Bool.t

Compounds

val structure : ?attrs:attr list -> string -> (string * t) list -> t

structure name fields constructure a structure type.

val is_structure : t -> Core_kernel.Bool.t
val union : ?attrs:attr list -> string -> (string * t) list -> t

union name fields conunion a union type.

val is_union : t -> Core_kernel.Bool.t
val function_ : ?attrs:attr list -> ?variadic:Core_kernel.Bool.t -> ?return:t -> (string * t) list -> t

function args constructs a function type.

  • parameter return

    defaults to `Void.

val is_function : t -> Core_kernel.Bool.t
val pp : Stdlib.Format.formatter -> t -> unit
val pp_proto : Stdlib.Format.formatter -> proto -> unit