Module InferBase.PolyFields
type 'r sub
=
|
S : ('r, 'f) InferStdlib.IStd.Field.t * 'f t -> 'r sub
type ('r, 'a) user
=
{
f : f. string -> ('r -> 'f) -> 'a;
}
val make : ?subfields:'r sub list -> ((_, 'r, 'r t) InferStdlib.IStd.Field.user -> 'r t list) -> 'r t
Pass
Fields.map_poly
generated by@@deriving fields
for the record'r
you are interested in to get the polymorphic getters of the fields of'r
. A dummy field "ALL" is added too.Subfields appearing in
subfields
will be added too. Each subfield is specified byS (field, poly_fields)
wherefield
is the correspondingField.t
value (generated by@@deriving fields
) andpoly_fields
is the result of this function for the field record type.