package ppx_type_directed_value

  1. Overview
  2. Docs
module 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.

module Key : sig ... end
module Type_nat : sig ... end

Type-level naturals used for tracking size of a list

module 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

module 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

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

Data structure that packages the associated Keys of a record

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

Data structure that packages the associated Keys of a variant

module type S = sig ... end

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