Caml1999I037  W)Unit_info,intf_or_impl<;@@$Intf@@5parsing/unit_info.mliXEYXE]@@A@$Impl@@ XE^ XEd@@B@@@A@@@@@XEE@@A@@@A@'modname=;@@@A&stringQ@@@@@@@YeeYez@@@@.C@A@(filename>;@@@A@@@@@@@-Z{{.Z{@@@@=D@A@+file_prefix?;@@@A @@@@@@@<[=[@@@@LE@A@%error@;@@0Invalid_encoding+@@@@@P]Q]@@`G@@@A@@@@@T]@@@AcF@A@ %ErrorA##exnG@"@@@@@A&_none_@@A@uH@B@(modulizeB@X@@@d@@@@@@xa**ya*I@@I@@)normalizeC@k@@@o@@@@@@dd@@J@@7lax_modname_from_sourceD@J@@@%@@@@@@ii@@K@@:strict_modname_from_sourceE@[@@@6@@@@@@m@@m@s@@L@@,is_unit_nameF@D@@@$boolE@@@@@@s  s  3@@M@@!tG;@@@A@@@@@x j jx j p@@@@N@A@+source_fileH@@@@@@@@@@E . .E . L@@O@@&prefixI@@@@@@@@@@H  H  @@P@@'modnameJ@$@@@@@@@@@L  L  !@@Q@@$kindK@5@@@@@@@@@O j jO j @@"R@@/check_unit_nameL@G@@@$unitF@@@@@@&T 6 6'T 6 U@@6S@@$makeM-check_modname&optionL~@@@@@@+source_file@@@@9@@@@a@@@y@@@@@@@@@@@@R]S_@@bT@@Ӡ(ArtifactN@!t];@@@A@@@@@bcBDccBJ@@@@rU@A@+source_file^@@@@>)@@@@@@@@@yk69zk6^@@V@@&prefix_@@@@@@@@@@nn@@W@@(filename`@(@@@L@@@@@@qq2@@X@@'modnamea@9@@@5@@@@@@ty|ty@@Y@@-from_filenameb@k@@@M@@@@@@y/2y/R@@Z@@@@b--{TW@[@@@#cmiO@@@@{!t@@@@@@ @@\@@#cmoP@ @@@!t@@@@@@   $@@]@@#cmxQ@@@@'!t@@@@@@%%%=@@ ^@@#objR@0@@@:!t@@@@@@>>>V@@_@@#cmtS@C@@@M!t@@@@@@!WW"Wo@@1`@@$cmtiT@V@@@`!t@@@@@@4pp5p@@Da@@%annotU@i@@@s!t@@@@@@GH@@Wb@@-companion_objV@!t@@@!t@@@@@@\]@@lc@@-companion_cmtW@!t@@@!t@@@@@@qr@@d@@-companion_cmiX@!t@@@!t@@@@@@%@@e@@/mli_from_sourceY@@@@H@@@@@@@@f@@1mli_from_artifactZ@!t@@@[@@@@@@@@g@@&is_cmi[@!t@@@@@@@@@;@@h@@3find_normalized_cmi\@@@@!t@@@@@@@@i@@@g9.)Unit_info0ڀh%(&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@@@Caml1999T037m!@;C)Unit_info*ocaml.text&_none_@@A This module centralize the handling of compilation files and their metadata. Maybe more importantly, this module provides functions for deriving module names from strings or filenames. 5parsing/unit_info.mliP77T@@@@@@3@@@@@@#intA;@@@A@@@@@:@A@$charB;@@A@@@@@>@A@&stringQ;@@ A@@@@@B@@@%bytesC;@@ A@@@@@F@@@%floatD;@@A@@@@@J@@@$boolE;@@%falsec@@T@$trued@@Z@@@A@@@@@[@A@$unitF;@@"()e@@e@@@A@@@@@f@A@ #exnG;@@@A@@@@@j@@@#effH;@@O@A@A@@@@@@s@@@,continuationI;@@Q@@P@B@A@nY@@@@@@@@@%arrayJ;@@R@A@A@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern @ @0Division_by_zero]#@@@A  @+End_of_file\#$@@@A@'FailureY#,@'@@A!$$@0Invalid_argumentX#5@0@@A*$-#-@-Match_failureV#>@@=@9@;@@a@@A;5>4>@)Not_foundZ#O@@@AC=F<F@-Out_of_memoryW#W@@@AKENDN@.Stack_overflow^#_@@@ASMVLV@.Sys_blocked_io_#g@@@A[U^T^@)Sys_error[#o@j@@Ad^g]g@:Undefined_recursive_modulea#x@@w@s@u@@h@@Auoxnx@:Continuation_already_takenb#@@@A}wv@&Stdlib@Ax A {1:modname_from_strings Module name convention and computation} VVC@@@@@@A+,intf_or_implAXEJXEV@@;@@$Intf@@XEYXE]@@A@$Impl@@XE^XEd@@B@@@A@@@@@XEE@@A@@@@#@@@@@#XE`@@@@@@A@@@@A+'modnameBYejYeq@@;@@@A@@@@@@@YeeYez@@@@C@@@Aг &stringYet @@3@KE;@@@A$@@@@@@@@@@@@A@@@@3@ @A@A+(filenameCZ{Z{@@;@@-A@@@@@@@Z{{Z{@@@@D@@@Aг &stringZ{ @@3@-HB;@@@A#@@@@@@@@@@@@A@@@@3        @ @A@A++file_prefixD[[@@;@@YA@@@@@@@"[#[@@@@;E@@@Aг &string,[ @@3*))*****@-GA;@@@A#@@@@@@@@@@@@A@@@@376677777@ @A@A+%errorEE]F]@@;@@0Invalid_encodingi@@@@@T]U]@@mG@@@A@@@@@X]@@@ApF@@# _]@ @г(filenameh]@@3feefffff@=WQ+;@@@A@@@@@@@@@A@@@@@@A@@@3lkklllll@@A@%ErrorFz^{^@#@A@@@@@A^^@@H@@г %error^ @@3@(RL@A@@@@@@@(modulizea*.a*6@б@гr&stringa*8a*>@@ @@@3@93@A@@г'modnamea*Ba*I@@ @@@@@@@@@@@a** @)ocaml.docԐ 3 [modulize s] capitalizes the first letter of [s]. ``)@@@@@@@I@@@吠@@@@@@3)normalizedd@б@г&stringdd@@ @@@3@La:@A@@г̠&stringdd@@ @@@@@@@@@@@ d @K 6 [normalize s] uncapitalizes the first letter of [s]. cKKcK@@@@@@@3J@@@[.@@@@@@17lax_modname_from_source1i2i@б@гO(filename==>>>>>@J_8@A@@г'modnameKiLi@@ @@@@@@@@@@@Vi @ [lax_modname_from_source filename] is [modulize stem] where [stem] is the basename of the filename [filename] stripped from all its extensions. For instance, [lax_modname_from_source "/pa.th/x.ml.pp"] is ["X"]. cfdh@@@@@@@@|K@@@w@@@@@@1:strict_modname_from_sourcezm@D{m@^@б@г(filenamem@`m@h@@ @@@3@J_8@A@@гԠ'modnamem@lm@s@@ @@@@@@@@@@@m@@ @ݐ ~ Same as {!lax_modname_from_source} but raises an {!error.Invalid_encoding} error on filename with invalid utf8 encoding. kl ?@@@@@@@L@@@@@@@@@1͐ ; {2:module_name_validation Module name validation function}ouuou@@@@@@3@CX1@A,is_unit_names  s  !@б@г!'modnames  $s  +@@ @@@@@г$bools  /s  3@@ @@@'@@@@@*@@@s   @7 T [is_unit_name name] is true only if [name] can be used as a valid module name. qr @@@@@@@M@@@G@@@@@@I(' - {1:unit_info Metadata for compilation unit} $v 6 6%v 6 h@@@@@@3#""#####@[V1@AA+!t G1x j o2x j p@@;@@qA@@@@@5x j j@s  Metadata for a compilation unit: - the module name associated to the unit - the filename prefix (dirname + basename with all extensions stripped) for compilation artifacts - the input source file For instance, when calling [ocamlopt dir/x.mli -o target/y.cmi], - the input source file is [dir/x.mli] - the module name is [Y] - the prefix is [target/y] By q qCB  @@@@@@@@@[N@@@A@U@@@@@@@*@+source_file!YE . 2ZE . =@б@г3!tdE . ?eE . @@@ @@@3feefffff@D>8@A@@г(filenamesE . DtE . L@@ @@@@@@@@@@@~E . . @ , [source_file u] is the source file of [u]. D  D  -@@@@@@@O@@@@@@@@@1&prefix"H  H  @б@г|!tH  H  @@ @@@3@J_8@A@@г+file_prefixH  H  @@ @@@@@@@@@@@H   @ 0 [prefix u] is the filename prefix of the unit. G N NG N @@@@@@@P@@@萠@@@@@@1'modname#L  L  @б@гŠ!tL  L  @@ @@@3@J_8@A@@гE'modnameL  L  !@@ @@@@@@@@@@@L   @N ` [modname u] or [artifact_modname a] is the module name of the unit or compilation artifact.J  K  @@@@@@@6Q@@@^1@@@@@@1$kind$4O j n5O j r@б@г!t?O j t@O j u@@ @@@3A@@AAAAA@J_8@A@@г,intf_or_implNO j yOO j @@ @@@@@@@@@@@YO j j @ A [kind u] is the kind (interface or implementation) of the unit. fN # #gN # i@@@@@@@R@@@z@@@@@@1/check_unit_name%}T 6 :~T 6 I@б@гW!tT 6 LT 6 M@@ @@@3@J_8@A@@гD$unitT 6 QT 6 U@@ @@@@@@@@@@@T 6 6 @ [check_unit_name u] prints a warning if the derived module name [modname u] should not be used as a module name as specified by {!is_unit_name}[ ~strict:true]. Q  S  5@@@@@@@S@@@Ð@@@@@@1$make&]]@б-check_modnameг$bool^^@@ @@@3@La:@A@@б+source_fileг(filename^^@@ @@@@@б@гd,intf_or_impl__@@ @@@"@@б@г렐+file_prefix__@@ @@@1@@гࠐ!t__@@ @@@>@@@@@A@@@%@@D( @@B7@@G ^@@YR@@@ @@P)^@@ @,]@j @ [make ~check ~source_file kind prefix] associates both the [source_file] and the module name {!lax_modname_from_source}[ target_prefix] to the prefix filesystem path [prefix]. If [check_modname=true], this function emits a warning if the derived module name is not valid according to {!check_unit_name}. 9V W W:\@@@@@@@RT@@+@zM@@@@@@p(Artifact-HRb-4Sb-<@k[@@БA+!t'IacBIbcBJ@@;@@A@@@@@ecBD@ Metadata for a single compilation artifact: - the module name associated to the artifact - the filesystem path - the input source file if it exists rdKKsh@@@@@@@@@U@@@A@@@@@@@@3}||}}}}}@X@A!@+source_file(k6=k6H@б@г5!tk6Jk6K@@ @@@3@@:@A@@г&optionk6Xk6^@г (filenamek6Ok6W@@ @@@@@@@@@ @@@$@@!'@@@k69@ 9 [source_file a] is the source file of [a] if it exists. jj5@@@@@@@V@@*@ @@@@@@@&prefix)nn@б@г!tnn@@ @@@3@Yn8@A@@г䠐+file_prefixnn@@ @@@@@@@@@@@n @F @ [prefix a] is the filename prefix of the compilation artifact. m`bm`@@@@@@@.W@@@V)@@@@@@1(filename*,q-q#@б@г֠!t7q%8q&@@ @@@398899999@J_8@A@@гY(filenameFq*Gq2@@ @@@@@@@@@@@Qq @ A [filename u] is the filesystem path for a compilation artifact. ^p_p@@@@@@@wX@@@r@@@@@@1'modname+utyvty@б@г!ttyty@@ @@@3@J_8@A@@гϠ'modnametyty@@ @@@@@@@@@@@ty| @ؐ < [modname a] is the module name of the compilation artifact.s47s4x@@@@@@@Y@@@@@@@@@1-from_filename,y/6y/C@б@гܠ(filenamey/Ey/M@@ @@@3@J_8@A@@гw!ty/Qy/R@@ @@@@@@@@@@@y/2 @! [from_filename filename] reconstructs the module name [lax_modname_from_source filename] associated to the artifact [filename]. vx.@@@@@@@ Z@@@1@@@@@@1@A@|F@&@@q@Q*@@3@>S,@A3        @@Ab->{TW@@O" ' {1:artifact_function Build artifacts }a a,@@@@@@@"b--@@76 : {1:info_build_artifacts Derived build artifact metadata} 3}YY4}Y@@@@@@321122222@@A@@`9@@@d@@21@11@@@1@1@.@A#cmi.WX@б@г1!tbc@@ @@@2@@г!t(Artifactst @ w x @@@@@@H @@@@@K @@@ @ S Those functions derive a specific [artifact] metadata from an [unit] metadata.@@@@@@@\@@@@@@@@@j#cmo/  @б@г!t  @@ @@@3@f8@A@@гq!t(Artifact  "@  # $@@@@@@ @@@@@! @@@   @@]@@@@!#cmx0%)%,@б@г!t%.%/@@ @@@3@:O@A@@г!t(Artifact%3%;@  %< %=@@@@@@ @@@@@! @@@ %% @@ &^@@@@!#obj1 >B >E@б@г!t $>G %>H@@ @@@3 & % % & & & & &@:O@A@@г!t(Artifact 7>L 8>T@  ;>U <>V@@@@@@ @@@@@! @@@ G>> @@ __@@@@!#cmt2 RW[ SW^@б@г,!t ]W` ^Wa@@ @@@3 _ ^ ^ _ _ _ _ _@:O@A@@г!t(Artifact pWe qWm@  tWn uWo@@@@@@ @@@@@ ! @@@ WW @@ `@@@@!$cmti3 pt px@б@гe!t pz p{@@ @@@!3        @:O@A@@гU!t(Artifact p p@  p p@@@@@@" @@@@@#! @@@ pp @@ a@@@@!%annot4  @б@г!t  @@ @@@$3        @:O@A@@г!t(Artifact  @   @@@@@@% @@@@@&! @@@  @@ b@@@@!-companion_obj5  @б@г!t(Artifact  @   @@@@@@'3        @CX(@A @@г!t(Artifact $ %@  ( )@@@@@@( @@@@@)& @@@ 4 @r 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.  A B]@@@@@@@ Zc@@@ U@@@@@@:-companion_cmt6 X Y@б@г!t(Artifact g h@  k l@@@@@@*3 n m m n n n n n@\zA@A @@г+!t(Artifact  @   @@@@@@+ @@@@@,& @@@  @@ d@@@@!-companion_cmi7   @б@гU!t(Artifact   @   @@@@@@-3        @Ca(@A @@гm!t(Artifact  #@  $ %@@@@@@. @@@@@/& @@@  @ - Beware that [companion_cmi a] strips all extensions from the filename of [a] 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].  && VX@@@@@@@ e@@@ 򐠠@@@@@@:  K {1:ml_mli_cmi_interaction Mli and cmi derived from implementation files }  ZZ Z@@@@@@3        @Lj1@A   The compilation of module implementation changes in presence of mli and cmi files, the function belows help to handle this.   2@@@@@@/mli_from_source8  @б@г!t $ %@@ @@@0+@@г D(filename 1 2@@ @@@18@@@@@2;@@@ < @z [mli_from_source u] is the interface source filename associated to the unit [u]. The actual suffix depends on {!Config.interface_suffix}.  I44 J@@@@@@@ bf@@@ ]@@@@@@Z1mli_from_artifact9 ` a@б@г!t(Artifact o p@  s t@@@@@@33 v u u v v v v v@|fA@A @@г (filename  @@ @@@4@@@@@5@@@  @̐ [mli_from_artifact t] is the name of the interface source file derived from the artifact [t]. This variant is necessary when handling artifacts derived from an unknown source files (e.g. packed modules).   @@@@@@@ g@@@ @@@@@@1&is_cmi: ! '@б@гm!t(Artifact ) 1@  2 3@@@@@@63        @SqA@A @@г $bool 7 ;@@ @@@7@@@@@8@@@  @  Check if the artifact is a cmi   @@@@@@@ h@@@ . @@@@@@13find_normalized_cmi;  @б@гޠ!t  @@ @@@93        @Jh8@A@@г!t(Artifact " #@  & '@@@@@@: @@@@@;! @@@ 2 @ p [find_normalized_cmi u] finds in the load_path a file matching the module name [modname u]. @raise Not_found if no such cmi exists  ?== @@@@@@@@ Xi@@@  S@@@@@@:@  A@  A@ k eA@ A ;A@  A@  B@  @ z S@ 3 @@m@93A@@@^@>@@H@'@h0T!@@$@@o@h8@1@@@S@3@@vQ@1@@a@@3        @~c@A@ H************************************************************************ A@@ A@L@ H  BMM BM@ H OCaml  C C@ H  D D3@ H Florian Angeletti, projet Cambium, Inria Paris  E44 E4@ H  F F@ H Copyright 2023 Institut National de Recherche en Informatique et  G G@ H en Automatique.  H Hg@ H  Ihh Ih@ H All rights reserved. This file is distributed under the terms of  J J@ H the GNU Lesser General Public License version 2.1, with the  K KN@ H special exception on linking described in the file LICENSE.  LOO LO@ H  M M@ H************************************************************************ N N5@ * This module centralize the handling of compilation files and their metadata. Maybe more importantly, this module provides functions for deriving module names from strings or filenames.  렠 B* {1:modname_from_strings Module name convention and computation}  h 4* [modulize s] capitalizes the first letter of [s].  7* [normalize s] uncapitalizes the first letter of [s].  ڠ * [lax_modname_from_source filename] is [modulize stem] where [stem] is the basename of the filename [filename] stripped from all its extensions. For instance, [lax_modname_from_source "/pa.th/x.ml.pp"] is ["X"].  * Same as {!lax_modname_from_source} but raises an {!error.Invalid_encoding} error on filename with invalid utf8 encoding.  N <* {2:module_name_validation Module name validation function} 3 U* [is_unit_name name] is true only if [name] can be used as a valid module name.  .* {1:unit_info Metadata for compilation unit} ߠ * Metadata for a compilation unit: - the module name associated to the unit - the filename prefix (dirname + basename with all extensions stripped) for compilation artifacts - the input source file For instance, when calling [ocamlopt dir/x.mli -o target/y.cmi], - the input source file is [dir/x.mli] - the module name is [Y] - the prefix is [target/y] Ġ -* [source_file u] is the source file of [u]. ~ 1* [prefix u] is the filename prefix of the unit. 8 a* [modname u] or [artifact_modname a] is the module name of the unit or compilation artifact. B* [kind u] is the kind (interface or implementation) of the unit.  * [check_unit_name u] prints a warning if the derived module name [modname u] should not be used as a module name as specified by {!is_unit_name}[ ~strict:true]. f A* [make ~check ~source_file kind prefix] associates both the [source_file] and the module name {!lax_modname_from_source}[ target_prefix] to the prefix filesystem path [prefix]. If [check_modname=true], this function emits a warning if the derived module name is not valid according to {!check_unit_name}. ߠ (* {1:artifact_function Build artifacts } * Metadata for a single compilation artifact: - the module name associated to the artifact - the filesystem path - the input source file if it exists  :* [source_file a] is the source file of [a] if it exists. U A* [prefix a] is the filename prefix of the compilation artifact.  B* [filename u] is the filesystem path for a compilation artifact. ɠ =* [modname a] is the module name of the compilation artifact. * [from_filename filename] reconstructs the module name [lax_modname_from_source filename] associated to the artifact [filename]. = ;* {1:info_build_artifacts Derived build artifact metadata}  T* Those functions derive a specific [artifact] metadata from an [unit] metadata. * 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.  .* Beware that [companion_cmi a] strips all extensions from the filename of [a] 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]. [ L* {1:ml_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. 0 * [mli_from_source u] is the interface source filename associated to the unit [u]. The actual suffix depends on {!Config.interface_suffix}.  * [mli_from_artifact t] is the name of the interface source file derived from the artifact [t]. This variant is necessary when handling artifacts derived from an unknown source files (e.g. packed modules).  !* Check if the artifact is a cmi [ * [find_normalized_cmi u] finds in the load_path a file matching the module name [modname u]. @raise Not_found if no such cmi exists  @-./boot/ocamlc)-nostdlib"-I&./boot*-use-prims2runtime/primitives"-g0-strict-sequence*-principal(-absname"-w8+a-4-9-40-41-42-44-45-48+-warn-error"+a*-bin-annot/-strict-formats"-I'parsing"-I%utils"-I'parsing"-I&typing"-I(bytecomp"-I,file_formats"-I&lambda"-I*middle_end"-I2middle_end/closure"-I2middle_end/flambda"-I=middle_end/flambda/base_types"-I'asmcomp"-I&driver"-I(toplevel"-I%tools"-I'runtime"-I1otherlibs/dynlink"-I-otherlibs/str"-I4otherlibs/systhreads"-I.otherlibs/unix"-I8otherlibs/runtime_events"-c  =/builds/workspace/precheck/flambda/false/label/ocaml-linux-32 >10/.-,+*)('&%$#"! @@0lY8 wS3        @ @@8CamlinternalFormatBasics0%FU(Q/Tu&Stdlib0Lku]8_٠ Ɛ0ڀh%(@0ڀh%(Aj@@Ȑ 8m@@ Œ @:  @  @@ǰ  @i f @={@k ' a@ ~ @@# P @ 8 V@%<v J <@LJ@@ Y@@@@ܰ  Z@  W@ q @-v  @"@o  @T@@  7 = O@@P@@