package b0

  1. Overview
  2. Docs

Library names

Module names

type t

The type for library names looked up in OCAMLPATH.

This is either:

  • The name of an OCaml library that follows the OCaml library convention. For example the b0.std names looks up b0/std/lib.cm{a,xa,xs}. These libraries are assumed to have been compiled according to the library convention and have their library dependencies embedded in their objects.
  • For legacy reasons, the name of an OCaml library followed by a slash to indicate the name of an archive. That is for example b0.std/b0_std, which looks up b0/std/b0_std.cm{a,xa,xs}. These libraries do not have their library dependencies specified, their dependencies are looked by a best-effort data-driven resolution procedure.
val v : string -> t

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

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

of_string s is a library name from n.

val to_string : ?no_legacy:bool -> t -> string

to_string n is n as a string. If no_legacy is true does not show the legacy part of the lib.

val is_legacy : t -> bool

legacy n is true if n is a legacy name.

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 : Set.S with type elt = t

Library name sets.

module Map : Map.S with type key = t

Library name maps.

OCaml

Innovation. Community. Security.