package profunctor

  1. Overview
  2. Docs
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) Record_builder.Hlist.cons, 'tail, 'all_fields Record_builder.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 Record_builder.Hlist.nonempty, Record_builder.Hlist.nil, 'all_fields Record_builder.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.