package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.file/B0_ocaml/Libname/index.html

Module B0_ocaml.LibnameSource

Library names.

FIXME. This did not become a reality.

Library names are dot separated segments of uncapitalized OCaml compilation unit names. Replacing the dots by the platform directory separator yields the directory of the library relative to the OCAMLPATH. Here are examples of library names and corresponding library directories for the following OCAMLPATH:

OCAMLPATH=/home/bactrian/opam/lib:/usr/lib/ocaml

Library name       Library directory
----------------------------------------------------------------
ptime.clock.jsoo   /home/bactrian/opam/lib/ptime/clock/jsoo
re.emacs           /home/bactrian/opam/lib/re/emacs
ocamlgraph         /usr/lib/ocaml/ocamlgraph
ocaml.unix         /usr/lib/ocaml/ocaml/unix
N/A (shadowed)     /usr/lib/ocaml/re/emacs

For legacy reasons library names also correspond to ocamlfind package names.

Library names

Sourcetype t

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

Sourceval v : string -> t

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

Sourceval name : t -> string

name n is the name of s as specified in v.

Sourceval root : t -> string

root n is the root name of n, that is the leftmost one.

Sourceval basename : t -> string

basename n is the basename of n, that is the right most one.

Sourceval undot : rep:B0_std.Char.t -> t -> string

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

Sourceval to_archive_name : t -> string

to_archive_name n is undot ~rep:'_' n.

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

of_string s is a library name from n.

Sourceval to_string : t -> string

to_string n is n as a string.

Sourceval to_fpath : t -> B0_std.Fpath.t

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

Sourceval equal : t -> t -> bool

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

Sourceval compare : t -> t -> int

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

pp formats a library name.

Sourcemodule Set : Set.S with type elt = t

Library name sets.

Sourcemodule Map : Map.S with type key = t

Library name maps.

On This Page
  1. Library names