package omod
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=cab9e8ab6ca6e836fdaa3dcf9552d31e4de2bf069fcab096c1565d204ff91fc3516cd017a13702d749580bd3563c462db3277ab036cfc5d3cb9703a08ddbb927
doc/omod.support/Omod_support/Cobj/index.html
Module Omod_support.CobjSource
Compilation objects
Package identifiers
The type for package identifiers. A package name and its root directory.
pp_pkg_id formats package identifiers.
Dependencies
The type for compilation object dependencies. A module name and an optional interface digest.
pp_dep formats a dependency.
Specifications
spec_of_string s parses a compilation object specification from s. This parses the [PKG.]M(@VARIANT)+ syntax.
Compilation objects
The type for kind of compilation objects.
exts are the file extensions of compilation objects.
The type for compilation objects.
val v :
kind:kind ->
pkg_id:pkg_id ->
name:string ->
iface_digest:Digest.t option ->
iface_deps:dep list ->
in_archive:bool ->
path:Omod.fpath ->
path_loads:t list Lazy.t ->
tv is a compilation object with the given parameters, see the documentation of accessors for semantics.
add_file ~pkg_id acc f adds the compilation objects of file f in package pkg_id to acc. If f's extension doesn't match a supported compilation object file this is acc.
name c is c's capitalized module name (more precisely compilation unit name).
path c is c's file path.
path_loads c are all the objects that are loaded whenever path is loaded (includes c itself). For paths that point to archives this has all the objects of the archive.
Predicates
Formatters
pp formats a compilation object.
Indexes and dependency resolvers
The type for dependency resolutions. Maps module names to their resolved object.
val resolve_deps :
variants:Omod.Private.String.Set.t ->
sat:(t -> bool) ->
kind:kind ->
Index.t ->
root_alts:t list list ->
(res list, string) resultresolve_deps ~variants ~sat ~kind i roots is a list of resolutions that recursively resolve the dependencies of the alternative root object roots root_alts to compilation objects of kind kind and satisfying sat using the twists of Index.cobjs_for_dep_res.
fold_res res f acc folds f with acc over the partial dependency order of res raises Invalid_argument if the dependencies of objects in res are not defined in res, this can't happen if the map is a result of resolve_deps.
val loads :
variants:Omod.Private.String.Set.t ->
sat:(t -> bool) ->
kind:kind ->
Index.t ->
root_alts:t list list ->
(Omod.fpath list list, string) resultloads ~sat ~kind i root_alts resolves the alternative root objects roots root_alts to alternative load sequences of object paths of that have objects of kind kind or Cmis (mli-only modules). All the objects involved in the load sequence satisfy sat.