package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. name : Base.string;
    (*

    See flag_name below.

    *)
  2. doc : Base.string;
  3. aliases : Base.string Base.list;
}
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t -> t -> int
val aliases : t -> Base.string Base.list
val doc : t -> Base.string
val name : t -> Base.string
module Fields : sig ... end
val sexp_of_t : t -> Sexplib0.Sexp.t
val flag_name : t -> Base.string Base.Or_error.t

flag_name infers the string which one would pass on the command line. It is not the same as the raw name field, which additionally encodes num_occurrences and requires_arg (sort of).

val num_occurrences : t -> Num_occurrences.t Base.Or_error.t
val requires_arg : t -> Base.bool Base.Or_error.t

requires_arg gives undefined behavior on escape flags. This is a limitation of the underlying shape representation.

val t_of_sexp : Base.Sexp.t -> t
  • deprecated [since 2020-04] Use [Command.Stable.Shape.Flag_info].