package ppx_type_directed_value

  1. Overview
  2. Docs

Module Ppx_type_directed_value_runtime.Type_directedSource

Sourcemodule type Type_directed_value = sig ... end

Packages the name of the constructor (variants) / field (records) and the associated type-directed value.

E.g., the corresponding Key of the record field f1 : int is { name = "f1"; value = M_int } where M is the name of the module from which we are deriving type-directed values.

Sourcemodule Key : sig ... end
Sourcemodule Type_nat : sig ... end

Type-level naturals used for tracking size of a list

Sourcemodule Indexed_seq : sig ... end

A generic data structure that models a list of 'a M.t, where the first index of the GADT is the product of each type used to instantiate 'a M.t in the list, and the second index tracks the length of the list using Type_nat

Sourcemodule Variant_constructor = Indexed_seq.Any_length

Data structure that packages the associated type-directed values of a specific variant constructor

Data structure that packages the associated type-directed values of a tuple

Sourcemodule Record (M : Type_directed_value) : sig ... end

Data structure that packages the associated Keys of a record

Sourcemodule Variant (M : Type_directed_value) : sig ... end

Data structure that packages the associated Keys of a variant

Sourcemodule type S = sig ... end

Signature that a user-provided module should implement to guide the code generation of type-directed values