package ppx_fields_conv

  1. Overview
  2. Docs
module Per_field : sig ... end
module Iterator : sig ... end
module Direct_iterator : sig ... end
type t =
  1. | Per_field of Per_field.t
  2. | Iterator of Iterator.t
  3. | Direct_iterator of Direct_iterator.t
val all : t Base.list
val compare : t -> t -> Base.int
val equal : t -> t -> Base.bool
val sexp_of_t : t -> Base.Sexp.t
val t_of_sexp : Base.Sexp.t -> t
include Base.Comparator.S with type t := t
type comparator_witness
val generator : add_dependencies:Base.bool -> (ctxt:Ppxlib.Expansion_context.Deriver.t -> 'input -> ((t, comparator_witness) Base.Set.t, Ppxlib.Location.Error.t) Base.Result.t -> 'output) -> ('output, 'input) Ppxlib.Deriving.Generator.t

Creates a @@deriving generator that determines a set of selectors from optional flags, or reports a syntax error.

val deriving_clause : loc:Ppxlib.location -> t Base.list -> Ppxlib.expression Base.option

Creates a fields expression for a @@deriving attribute, with appropriate arguments to define the given selectors. Returns None if no selectors are chosen.

val to_expression : t -> loc:Ppxlib.location -> Ppxlib.expression

Produces an expression that reconstructs t at runtime.

OCaml

Innovation. Community. Security.