jon.recoil.org

Module Core.String_idSource

Like Identifiable, but with t = private string and stable modules.

include sig ... end
include sig ... end
module type S = sig ... end
module type S_with_extras = sig ... end
include Core.String_id.S__local__portable
Sourcetype t = private Base.String.t
include sig ... end
Sourceval globalize : Core.String_id.t @ local -> Core.String_id.t
Sourceval t_sexp_grammar : Core.String_id.t Sexplib0.Sexp_grammar.t @@ portable
Sourceval sexp_of_t__stack : Core.String_id.t @ local -> Sexplib0.Sexp.t @ local
include Core.Identifiable.S__local__portable with type t := Core.String_id.t
Sourceval bin_shape_t : Bin_prot.Shape.t
val (>=) : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val (<=) : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val (=) : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val (>) : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val (<) : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val (<>) : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val equal : Core.String_id.t -> Core.String_id.t -> bool @@ portable
val compare : Core.String_id.t -> Core.String_id.t -> int @@ portable
val equal__local : Core.String_id.t @ local -> Core.String_id.t @ local -> bool @@ portable
val compare__local : Core.String_id.t @ local -> Core.String_id.t @ local -> int @@ portable
val ascending : Core.String_id.t -> Core.String_id.t -> int @@ portable
val descending : Core.String_id.t -> Core.String_id.t -> int @@ portable
val between : Core.String_id.t -> low:Core.String_id.t -> high:Core.String_id.t -> bool @@ portable
val clamp_exn : Core.String_id.t -> min:Core.String_id.t -> max:Core.String_id.t -> Core.String_id.t @@ portable
type comparator_witness
Sourcemodule Map : sig ... end
Sourcemodule Set : sig ... end
Sourcemodule Table : sig ... end
Sourcemodule Hash_set : sig ... end
Sourcemodule Hash_queue : sig ... end
include Base.Stringable.S__stack with type t := Core.String_id.t
Sourceval of_string : string -> Core.String_id.t
Sourceval to_string : Core.String_id.t -> string
include Diffable.S_atomic with type t := Core.String_id.t
module Diff : sig ... end
Sourcemodule Stable : sig ... end
Sourcemodule Make (M : sig ... end) () : sig ... end

Make customizes the error messages generated by of_string/of_sexp to include module_name. It also registers a pretty printer.

Sourcemodule Make_with_distinct_bin_shape (M : sig ... end) () : sig ... end

Like Make, but lets you specify a caller_identity to ensure that the bin-shape is distinct, which helps catch serialization bugs where identifiers with different meanings get confused with each other.

Sourcemodule Make_with_validate (M : sig ... end) () : sig ... end

Make_with_validate is like Make, but modifies of_string/of_sexp/bin_read_t to raise if validate returns an error. Before using this functor one should be mindful of the performance implications (the validate function will run every time an instance is created) as well as potential versioning issues (when validate changes old binaries still run the old version of the function).

Sourcemodule Make_with_validate_and_distinct_bin_shape (M : sig ... end) () : sig ... end

See Make_with_validate and Make_with_distinct_bin_shape

Sourcemodule Make_without_pretty_printer (M : sig ... end) () : sig ... end

This does what Make does without registering a pretty printer. Use this when the module that is made is not exposed in mli. Registering a pretty printer without exposing it causes an error in utop.

Sourcemodule Make_with_validate_without_pretty_printer (M : sig ... end) () : sig ... end

See Make_with_validate and Make_without_pretty_printer

Sourceval make : ?validate:(Base.String.t -> Base.Unit.t Core.Or_error.t) -> ?caller_identity:Bin_prot.Shape.Uuid.t -> ?include_pretty_printer:Base.Bool.t -> module_name:Base.String.t -> include_default_validation:Base.Bool.t -> Base.Unit.t -> (module Core.String_id.S_with_extras__local)