Library
Module
Module type
Parameter
Class
Class type
type ('b, 'a) profunctor = ('b, 'a) F.t
type 'a profunctor_term = ('a, 'a) F.t
A term of the profunctor where the input and output type are the same.
Although this module must use the type parameters separately internally all terms supplied as arguments or returned will have both type parameters equal. This type alias is used to allow automatically converting with some other type in some cases e.g. Of_conv_based
.
val prj : ('a, 'a) profunctor -> 'a profunctor_term
val inj : 'a profunctor_term -> ('a, 'a) profunctor
module Bare :
Record_builder.S2 with type ('b, 'a) applicative = ('b, 'a) profunctor
The underlying applicative record builder, which does not perform the contravariant mapping.
val field :
'field profunctor_term ->
('record, 'field) Base.Field.t ->
('field, _, _, 'record) Bare.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, _, 'record) Bare.Make_creator_types.handle_all_fields ->
'record profunctor_term
Build the overarching profunctor for the whole record.
This takes a partial application of Fields.make_creator
as its argument, which should supply no initial value but use field
to supply a term for every field of the record.
The type of this is designed to match up with Fields.make_creator
(see the example).