.Nm55.5.0+dev0-2025-04-28/)Unit_info,intf_or_implA;@@$Intf@@;../../parsing/unit_info.mliXEYXE]@@)Unit_infoA@$Impl@@ XE^ XEd@@ B@@@A@@@@@XEE@@A@ @@A@'modnameB;@@@A&string<@@@@@@@Yee Yez@@@@C@A@(filenameC;@@A=@@@@@@@.Z{{/Z{@@@@-D@A@+file_prefixD;@@ A>@@@@@@@=[>[@@@@>>V@@_@@#cmt2@)Unit_infol!t@@@)Unit_infom(Artifact!t@@@@@ @WWWo@@`@@$cmti3@)Unit_infon!t@@@!)Unit_infoo(Artifact!t@@@"@@#@ppp@@a@@%annot4@)Unit_infop!t@@@$)Unit_infoq(Artifact!t@@@%@@&@-.@@,b@@-companion_obj5@)Unit_infor(Artifact!t@@@')Unit_infos(Artifact!t@@@(@@)@LM@@Kc@@-companion_cmt6@)Unit_infot(Artifact!t@@@*)Unit_infou(Artifact!t@@@+@@,@kl@@jd@@-companion_cmi7@)Unit_infov(Artifact!t@@@-)Unit_infow(Artifact!t@@@.@@/@%@@e@@/mli_from_source8@)Unit_infox!t@@@0)Unit_infoy(filename@@@1@@2@@@f@@1mli_from_artifact9@)Unit_infoz(Artifact!t@@@3)Unit_info{(filename@@@4@@5@@@g@@&is_cmi:@)Unit_info|(Artifact!t@@@6}@@@7@@8@;@@h@@3find_normalized_cmi;@)Unit_info~!t@@@9)Unit_info(Artifact!t@@@:@@;@@@i@@@3 LThis module centralize the handling of compilation files and their metadata.@ p Maybe more importantly, this module provides functions for deriving module names from strings or filenames.@@@@@@@@@@@@AA4modname_from_strings &Module name convention and computation@@#6Unit_info.intf_or_impl@@@@@@@@@A@@@@#1Unit_info.modname@@@A @@@#2Unit_info.filename@@@A@@@#5Unit_info.file_prefix@@@A@@@#/Unit_info.error@@@@@@A@@@@/Unit_info.Error@@@@@@@2Unit_info.modulize3*modulize s ! capitalizes the first letter of !s!.@@@@@@@@@@@@@ @@@@⠕3Unit_info.normalize3+normalize s # uncapitalizes the first letter of !s!.@@@@@@@@@@@@@@@@@堕 !Unit_info.lax_modname_from_source3 lax_modname_from_source filename$ is -modulize stem' where $stem % is the basename of the filename (filename 5 stripped from all its extensions. For instance, (lax_modname_from_source "/pa.th/x.ml.pp"$ is #"X"!.@@@@@@@@@@@@@I@@@@ $Unit_info.strict_modname_from_source3(Same as 9D@/ but raises an  Unit_info.error.Invalid_encodingK@ 2 error on filename with invalid utf8 encoding.@@@@@@@@@@@@@e @@@@B6module_name_validation?Module name validation function@@6Unit_info.is_unit_name31is_unit_name name1 is true only if $name ( can be used as a valid module name.@@@@@@@@@@@@@@@@@A)unit_info=Metadata for compilation unit@@#+Unit_info.t3 Metadata for a compilation unit: &the module name associated to the unit@ ethe filename prefix (dirname + basename with all extensions stripped) for compilation artifacts@ 5the input source file For instance, when calling "ocamlopt dir/x.mli -o target/y.cmi!,@9the input source file is )dir/x.mli@3the module name is !Y@.the prefix is (target/y@@@@@@@@@@@@@@@@A@@87@@5Unit_info.source_file3-source_file u7 is the source file of !u!.@@@@@@@@@@@@C@D@@@@60Unit_info.prefix3(prefix u $ is the filename prefix of the unit.@@@@@@@@@@@@:@;@@@@-1Unit_info.modname3)modname u$ or 2artifact_modname a < is the module name of the unit or compilation artifact.@@@@@@@@@@@@7@8@@@@*.Unit_info.kind3&kind u 7 is the kind (interface or implementation) of the unit.@@@@@@@@@@@@.@/@@@@!9Unit_info.check_unit_name31check_unit_name u - prints a warning if the derived module name )modname u = should not be used as a module name as specified by D@- ~strict:true!.@@@@@@@@@@@@4@:5@@@@).Unit_info.make3 $make ~check ~source_file kind prefix9 associates both the +source_file5 and the module name 3D@. target_prefix # to the prefix filesystem path &prefix!.@' If 2check_modname=true X, this function emits a warning if the derived module name is not valid according to LD@!.@@@@@@@@@@@@R@RQ@ED@w=@z6@@@@(/2Unit_info.Artifact#3A1artifact_function0Build artifacts @@@@@@@@@@@@@A퐠#4Unit_info.Artifact.t3 +Metadata for a single compilation artifact: *the module name associated to the artifact@3the filesystem path@ "the input source file if it exists@@@@@@@@@@@@@@@@A@@BA@@>Unit_info.Artifact.source_file3-source_file a7 is the source file of !a. if it exists.@@@@@@@@@@@@M@N@@@@99Unit_info.Artifact.prefix3(prefix a 4 is the filename prefix of the compilation artifact.@@@@@@@@@@@@=@>@@@@.;Unit_info.Artifact.filename3*filename u 3 is the filesystem path for a compilation artifact.@@@@@@@@@@@@2@3@@@@#:Unit_info.Artifact.modname3)modname a 0 is the module name of the compilation artifact.@@@@@@@@@@@@'@(@@@@ Unit_info.Artifact.from_filename36from_filename filename % reconstructs the module name lax_modname_from_source filename # associated to the artifact (filename!.@@@@@@@@@@@@(@)@@@@@@@@@@@A4info_build_artifacts?Derived build artifact metadata@@-Unit_info.cmi3 "Those functions derive a specific (artifact2 metadata from an $unit. metadata.@@@@@@@@@@@@.@7/@@@@-Unit_info.cmo@@@@@@@ -Unit_info.cmx@@I@@@@-Unit_info.obj@@R@@@@㠕-Unit_info.cmt@@[@@@@Ϡ.Unit_info.cmti@@d@@@@/Unit_info.annot@@m@@@@7Unit_info.companion_obj3 The functions below change the type of an artifact by updating the extension of its filename. Those functions purposefully do not cover all artifact kinds because we want to track which artifacts are assumed to be bundled together.@@@@@@@@@@@@@|@@@@7Unit_info.companion_cmt@@@@@@7Unit_info.companion_cmi3,Beware that /companion_cmi a - strips all extensions from the filename of !a3 before adding the &".cmi" suffix contrarily to the other functions which only remove the rightmost extension. In other words, the companion cmi of a file /something.d.cmo% is -something.cmi) and not /something.d.cmi!.@@@@@@@@@@@@@@@@@A6ml_mli_cmi_interaction .Mli and cmi derived from implementation files @@ The compilation of module implementation changes in presence of mli and cmi files, the function belows help to handle this.@9Unit_info.mli_from_source31mli_from_source u = is the interface source filename associated to the unit !u?. The actual suffix depends on 7Config.interface_suffix@@!.@@@@@@@@@@@@@@@@@;Unit_info.mli_from_artifact33mli_from_artifact t H is the name of the interface source file derived from the artifact !t s. This variant is necessary when handling artifacts derived from an unknown source files (e.g. packed modules).@@@@@@@@@@@@@@@@@0Unit_info.is_cmi3>Check if the artifact is a cmi@@@@@@@@@@@@@ @@@@=Unit_info.find_normalized_cmi35find_normalized_cmi u < finds in the load_path a file matching the module name )modname u!.@@@@@@@@)Not_found5if no such cmi exists@@@@@@)@@@@@@@@A@@@@@