Module type Record_builder__.Record_builder_intf.Make_creator_types

These are the types used for building records by folding over fields.

You should never have to think about them, and should be able to skip straight on to Record_builder. They are exposed solely because they must be so that the application of Fields.make_creator will type-check.

type ('out, 'all_fields, 'extra) accum

An internal state which is folded through the fields.

type ('field, 'head, 'tail, 'all_fields, 'extra) fold_step = ('head'all_fields'extraaccum ‑> ('all_fields ‑> 'field) * ('tail'all_fields'extraaccum

Each part of the fold has a type of this form.

type ('field, 'tail, 'all_fields, 'extra) handle_one_field = ('field, ('field'tailRecord_builder.Hlist.cons'tail'all_fields Record_builder.Hlist.nonempty'extrafold_step

A step of the fold over a single field has this type.

Each argument to Fields.make_creator should take that field as an argument and return something of this type (see field below).

type ('record, 'all_fields, 'extra) handle_all_fields = ('record'all_fields Record_builder.Hlist.nonemptyRecord_builder.Hlist.nil'all_fields Record_builder.Hlist.nonempty'extrafold_step

The overall fold of multiple steps created by applying Fields.make_creator without an initial value should have a type of this form. You then supply it as an argument to build_for_record below.