An existential type used to gather all the fields constituing a record type. the
'record
parameter 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.
'record fields
is 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 Typerep_lib.Typename.t
val has_double_array_tag : 'a t ‑> bool
This 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 'a
given a witness
of type 'a t
. has_double_array_tag w
returns true
if 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
be floats
.
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.
Expose one direction of the isomorphism between a value of type 'a
and 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 internal_use_only : 'a Record_internal.t ‑> 'a t