Module Record_builder.Make

Parameters

Signature

type 'a applicative = 'a F.t
module Make_creator_types : Make_creator_types

These types have to be exposed so that the typechecker can tell that the use of Fields.make_creator is well-typed.

val field : 'field applicative ‑> ('record'fieldCore_kernel.Field.t ‑> ('field___Make_creator_types.handle_one_field

Supply the term for one field.

The type of this function is designed to match up with Fields.make_creator (see the example).

val build_for_record : ('record__Make_creator_types.handle_all_fields ‑> 'record applicative

Build the overarching applicative for the whole record.

This takes a partial application of Fields.make_creator as its argument, which supplies the applicative terms to use for each field of the record. It performs the mapping and combining of these terms automatically.

The type of this is designed to match up with Fields.make_creator (see the example).