Module Typerep.Record
type _ field=|Field : ('record, 'a) Field.t -> 'record fieldAn existential type used to gather all the fields constituing a record type. the
'recordparameter is the record type, it is the same for all the field of that record type. The type of the fields might be different for each field and is thus existential.
type 'record fields={get : field. ('record, 'field) Field.t -> 'field;}'record fieldsis a type isomorphic to'record. This gives a way to get the field value for each field of the record. The advantage of this representation is that it is convenient for writing generic computations.
val typename_of_t : 'a t -> 'a Typename.tval length : 'a t -> intReturns the number of fields of this record type definition.
val has_double_array_tag : 'a t -> boolThis is a low level metadata regarding the way the ocaml compiler represent the array underneath that is the runtime value of a record of type
'agiven a witness of type'a t.has_double_array_tag wreturnstrueif the array that represents runtime values of this type is an optimized ocaml float array. Typically, this will be true for record where all fields are statically known as to befloats.Note that you can't get this information dynamically by inspecting the typerep once it is applied, because there is at this point no way to tell whether one of the field is polymorphic in the type definition.
val create : 'a t -> 'a fields -> 'aExpose one direction of the isomorphism between a value of type
'aand a value of type'a fields. Basically, given an encoding way of accessing the value of all the fields of a record, create that record and return it.
val fold : 'a t -> init:'acc -> f:('acc -> 'a field -> 'acc) -> 'accfolding along the tags of the variant type
val internal_use_only : 'a Record_internal.t -> 'a t