package ppx_typed_fields

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Typed_fields_lib.SingletonSource

Parameters

module T : Base.T

Signature

Sourcetype 'a t =
  1. | T : T.t t
include S with type derived_on = T.t and type 'a t := 'a t
Sourcetype derived_on = T.t
Sourceval name : 'a t -> Base.string

The name of the field, e.g. "rgb" from the example above.

Sourceval path : 'a t -> Base.string Base.list

The path of a field, e.g. "rgb" from the example above. The list will have multiple elements if the field is a subproduct.

Sourceval __ord : 'a t -> Base.int Base.list
Sourcemodule Type_ids : sig ... end
Sourcemodule Packed : sig ... end

Packed is useful for making collections of 'a t's with different 'a's.

Sourcetype creator = {
  1. f : 'a. 'a t -> 'a;
}
Sourceval get : 'a t -> derived_on -> 'a
Sourceval set : 'a t -> derived_on -> 'a -> derived_on
Sourceval create : creator -> derived_on