Module type Record_builder.Make_creator_types

The types used internally for building records by folding over fields — you shouldn't need to know them, but they must be exposed to allow type-checking to succeed.

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'extra) accum -> ('all_fields -> 'field) * ('tail'all_fields'extra) accum

A step of the fold over one or more fields.

type ('field, 'tail, 'all_fields, 'extra) handle_one_field = ('field('field'tail) Hlist.cons'tail'all_fields Hlist.nonempty'extra) fold_step

A step of the fold over one field.

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

type ('record, 'all_fields, 'extra) handle_all_fields = ('record'all_fields Hlist.nonemptyHlist.nil'all_fields Hlist.nonempty'extra) fold_step

A step of the fold over all fields of a record.

The application of Fields.make_creator to all of the fields, but without an initial value for the fold, should have this type and be passed to Record_builder_S.build_for_record.