1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071(** A signature combining functionality that is commonly used for types that are intended
to act as names or identifiers.
Modules that satisfy [Identifiable] can be printed and parsed (both through string and
s-expression converters) and can be used in hash-based and comparison-based
containers (e.g., hashtables and maps).
This module also provides functors for conveniently constructing identifiable
modules. *)open!ImportmoduletypeArg=sigtypet[@@deriving_inlinecompare,hash,sexp]includePpx_compare_lib.Comparable.Swithtypet:=tincludePpx_hash_lib.Hashable.Swithtypet:=tincludeSexplib0.Sexpable.Swithtypet:=t[@@@end]includeStringable.Swithtypet:=t(** For registering the pretty printer. *)valmodule_name:stringendmoduletypeArg_with_comparator=sigincludeArgincludeComparator.Swithtypet:=tendmoduletypeS=sigtypet[@@deriving_inlinehash,sexp]includePpx_hash_lib.Hashable.Swithtypet:=tincludeSexplib0.Sexpable.Swithtypet:=t[@@@end]includeStringable.Swithtypet:=tincludeComparable.Swithtypet:=tincludePretty_printer.Swithtypet:=tvalhashable:tHashable.tendmoduletypeIdentifiable=sigmoduletypeArg=ArgmoduletypeArg_with_comparator=Arg_with_comparatormoduletypeS=S(** Used for making an Identifiable module. Here's an example.
{[
module Id = struct
module T = struct
type t = A | B [@@deriving compare, hash, sexp]
let of_string s = t_of_sexp (sexp_of_string s)
let to_string t = string_of_sexp (sexp_of_t t)
let module_name = "My_library.Id"
end
include T
include Identifiable.Make (T)
end
]} *)moduleMake(M:Arg):Swithtypet:=M.tmoduleMake_using_comparator(M:Arg_with_comparator):Swithtypet:=M.twithtypecomparator_witness:=M.comparator_witnessend