Module Linkdeps
: sigendtypet
The state of the linking check. It keeps track of compilation units provided and required so far.
typecompunit = stringtypefilename = stringvalcreate : complete:bool->tcreate~complete returns an empty state. If complete is true , missing compilation units will be treated
as errors.
valadd : t->filename:filename->compunit:compunit->provides:compunitlist->requires:compunitlist->unitaddt~filename~compunit~provides~requires registers the compilation unit compunit found in filename
to t .
- provides are units and sub-units provided by compunit
- requires are units required by compunitadd should be called in reverse topological order.
valrequired : t->compunit->boolrequiredtcompunit returns true if compunit is a dependency of previously added compilation units.
typecompunit_and_source = {
compunit : compunit ;
filename : filename ;
}
typeerror =
| Missing_implementations of(compunit*compunit_and_sourcelist)list
| Wrong_link_order of(compunit_and_source*compunit_and_sourcelist)list
| Multiple_definitions of(compunit*filenamelist)listvalcheck : t->erroroptioncheckt should be called once all the compilation units to be linked have been added. It returns some
error if:
-There are some missing implementations and complete is true
-Some implementation appear before their dependencies
valreport_error : print_filename:stringFormat_doc.printer->errorFormat_doc.format_printervalreport_error_doc : print_filename:stringFormat_doc.printer->errorFormat_doc.printer
OCamldoc 2025-06-12 Linkdeps(3o)