package record_builder

  1. Overview
  2. Docs

Parameters

Signature

type 'a applicative = 'a F.t

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, 'field) Core_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).

OCaml

Innovation. Community. Security.