Module Brzo_ocaml_be
OCaml domain best-effort helpers.
Resolver helpers
type ambs=[|`Ambs of (B0_ocaml.Mod_name.t * B0_std.Fpath.t list) list]The type for ambiguous external resolutions. The module name and the list of files that could match.
val resolve_intf_deps : Brzo_b0_ocaml.Mod_resolver.t -> local_mods:B0_ocaml.Mod_src.t B0_ocaml.Mod_name.Map.t -> in_dir:B0_std.Fpath.t -> B0_ocaml.Mod_name.Set.t -> (B0_std.Fpath.t list * B0_std.Fpath.t list * B0_ocaml.Mod_name.Set.t * ambs) B00.Memo.fiberresolve_intf_depsis likeresolve_impl_depsbut for compiling and interface.
val resolve_impl_deps : Brzo_b0_ocaml.Mod_resolver.t -> code:B0_ocaml.Cobj.code -> local_mods:B0_ocaml.Mod_src.t B0_ocaml.Mod_name.Map.t -> in_dir:B0_std.Fpath.t -> B0_ocaml.Mod_name.Set.t -> (B0_std.Fpath.t list * B0_std.Fpath.t list * B0_ocaml.Mod_name.Set.t * ambs) B00.Memo.fiberresolve_comp_deps r ~code ~local_mods ~in_dir depsresolvedepsfor compiling an implementation tocodeassuming local modulelocal_modsare compiled inin_dir. This results inlocal_objs, ext_objs, unresolved, ambwith:local_depsare path to compilation objects that corresponds tolocal_mods.ext_objsare external compilatino objects as resolved byrand its constraints.unresolvedare the elements ofdepsthat couldn't be resolved.ambare the external resolutions that were ambiguous.
val handle_amb_deps : Brzo_b0_ocaml.Mod_resolver.t -> B0_std.Fpath.t -> unresolved:B0_ocaml.Mod_name.Set.t -> ambs -> unit B00.Memo.fiberhandle_amb_deps file ~unresolved ambscontinues ifambsis empty and otherwise fails the fiber with help on how to restrict the resolver or getting unresolved dependencies.fileis the file for which amibguities were reported.
val handle_miss_user_deps : Brzo_b0_ocaml.Mod_resolver.t -> [ `Miss_deps of Brzo_b0_ocaml.Mod_resolver.dep list ] -> unit B00.Memo.fiberhandle_miss_user_deps r miss kcontinues withkifmissis empty and otherwise fails the fiber with help on how to try to get the missing dependencies.