Module Lib.Name

Library names

Library names

type t

The type for library names looked up in OCAMLPATH. For legacy reasons this may also correspond to an ocamlfind package name.

val v : string -> t

v s is a library for n. Raises Invalid_argument if s is not a valid library name.

val first : t -> string

first n is n's first name, that is the rightmost one.

val last : t -> string

last n is n's last name, that is the leftmost one.

val to_archive_name : t -> string

to_archive_name n is n with . mapped to _.

val undot : rep:B00_std.Char.t -> t -> string

undot ~rep n is n with . replaced by rep.

val of_string : string -> (t, string) Stdlib.result

of_string s is a library name from n.

val to_string : t -> string

to_string n is n as a string.

val to_fpath : t -> B00_std.Fpath.t

to_fpath n is n with dots replaced by Fpath.dir_sep_char.

val equal : t -> t -> bool

equal n0 n1 is true iff n0 and n1 are the same library name.

val compare : t -> t -> int

compare n0 n1 is a total order on library names compatible with equal.

val pp : t B00_std.Fmt.t

pp formats a library name.

module Set : Stdlib.Set.S with type Set.elt = t

Library name sets.

module Map : Stdlib.Map.S with type Map.key = t

Library name maps.