Module Brzo_b0_ocaml.Mod_src

Module sources.

Modules

module Deps : sig ... end

Source dependencies.

type t

The type for OCaml module sources, represents a module to compile.

val v : mod_name:Mod_name.t -> mli:B0_std.Fpath.t option -> mli_deps:Mod_name.Set.t -> ml:B0_std.Fpath.t option -> ml_deps:Mod_name.Set.t -> t

v ~mod_name ~mli ~mli_deps ~ml ~ml_deps is a module whose name is name, interface file is mli (if any), interface file module dependencies is mli_deps, implementation is ml (if any) and implementation file module dependencies ml_deps.

val mod_name : t -> Mod_name.t

mod_name m is m's name.

val mli : t -> B0_std.Fpath.t option

mli m is m's interface file (if any).

val mli_deps : t -> Mod_name.Set.t

mli_deps m are m's interface file dependencies.

val ml : t -> B0_std.Fpath.t option

ml m is m's implementation file (if any). *

val ml_deps : t -> Mod_name.Set.t

ml_deps m are m's implementation file dependencies.

Module name maps

val of_srcs : src_deps:Mod_name.Set.t B0_std.Fpath.Map.t -> srcs:B0_std.Fpath.t list -> t Mod_name.Map.t

of_srcs ~src_deps deps ~srcs determines source modules (mapped by their names) given sources srcs and their dependencies src_deps (e.g. obtainted via Deps.read. If there's more than one mli or ml file for a given module name a warning is logged and the file is dropped.

val resolve_local_mli_deps : t Mod_name.Map.t -> t -> t list * Mod_name.Set.t

resolve_local_mli_deps ms m is (mods, deps) with mods the modules that can be used to resolve some of the dependencies mli_deps m using the modules ms and deps the remaining dependencies to be resolved.

val resolve_local_ml_deps : t Mod_name.Map.t -> t -> t list * Mod_name.Set.t

resolve_local_ml_deps ms m is (mods, deps) with mods the modules that can be used to resolve some of the dependencies ml__deps m using the modules map ms and deps the remaining dependencies to be resolved.