6f %!Ҡ55.5.0+dev0-2025-04-28/$Weak!tA;!a@@A@A@O@B@@@5../../stdlib/weak.mliUU@@@@$Weak@@A@&create@#int@@@$Weak!t!a@B@@@@@@@"h#h@@!A@@&length@$Weak!t!a@B@@@@/@@@@@@AoBo@@@B@@#set@$Weak!t!a@B@@@@@P@@@@&optionL@@@$unit@@@@@@@@@@qsrs "@@pC@@#get@$Weak!t!a@B@@@@@@@@.@@@@@@@@z  z  :@@D@@(get_copy@$Weak!t!a@B@@@@@@@@T@@@@@@@@@  @  5@@E@@%check@$Weak!t!a@B@@@@@@@@$bool@@@@@@@@P U UP U t@@F@@$fill@$Weak!t!a@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@WW@@G@@$blit@$Weak!t!a@B@@@@@'@@@@$Weak!t@@@@9@@@@@@@@@@@@@@@@@@@@@@W]X]@@VH@@!S*D$dataB;@@jA@@@@@g~h~@@@@fI@A@!tC;@@sA@@@@@p>@q>F@@@@oJ@A@&create@n@@@$Weak!S!t@@@@@@0@@K@@%clear@$Weak!S!t@@@4@@@@@@@@L@@%merge@$Weak!S!t@@@@$Weak!S$data@@@$Weak!S$data@@@@@@@@ @@M@@#add @$Weak!S!t@@@@$Weak!S$data@@@@@@@@@@@@@N@@&remove!@$Weak!S!t@@@@$Weak!S$data@@@ @@@ @@ @@ @cec@@O@@$find"@$Weak!S!t@@@ @$Weak!S$data@@@$Weak!S$data@@@@@@@@FG@@EP@@(find_opt#@$Weak!S!t@@@@$Weak!S$data@@@$Weak!S$data@@@@@@@@@@@vw@@uQ@@(find_all$@$Weak!S!t@@@@$Weak!S$data@@@$list$Weak!S$data@@@@@@@@@@@HJHo@@R@@#mem%@$Weak!S!t@@@ @$Weak!S$data@@@!@@@"@@#@@$@@@S@@$iter&@@$Weak!S$data@@@%z@@@&@@'@$Weak!S!t@@@(@@@)@@*@@+@Y[Y@@T@@$fold'@@$Weak!S$data@@@,@#acc@5D@-@@.@@/@$Weak!S!t@@@0@@@1@@2@@3@(+-)+c@@'U@@%count(@$Weak!S!t@@@60@@@7@@8@BEGCE[@@AV@@%stats)@$Weak!S!t@@@9@N@@@:@U@@@;@\@@@<@c@@@=@j@@@>@q@@@?@@@@@A@Q@@W@@@@}&)@X@@ӱ$MakeE@!H~F&Stdlib'Hashtbl*HashedType<G;@@@A!t@@@ f@@@@dd@@@@Z@A@CG;@@@A@@@@@C@@@@A@?@A@@@ e@@@ d@@ c@8@5@4@ @@@ b`F@@@ a@@ `@,@)@(@@@@ _@>@@@ ^@@@ ]@@ \@@ [@@@@*@@@ Z@@@@ Y%@@@ X@@ W@@ V@@@@<@@@ U@$@@@ T7@@@ S@@ R@@ Q@@@@N@@@ P@6@@@ O9@@@ N@@ M@@ L@@@@_@@@ K@G@@@ JM@@@ I@@@ H@@ G@@ F@@@@t@@@ E@\@@@ DKd@@@ C@@@ B@@ A@@ @@@@@@@@ ?@s@@@ >sE@@@ =@@ <@@ ;@@@@@@@@ :@@@ 9@@ 8@@@@ 7@@@ 6@@ 5@@ 4@s@p@o@@@@@ 3@gg@@ 2@@ 1@@@@ 0@nn@@ /@@ .@@ -@Z@W@V@@@@ ,@@@ +@@ *@M@J@I@@@@ )@@@@ #@@@@ $@@@@ %@@@@ &@@@@ '@@@@ (@@ "@@ !@;@8@@@dd@[@@@@3 7Arrays of weak pointers and hash sets of weak pointers.@@@@@@@@@@@@A5../../stdlib/weak.mliA@3Low-level functions@@#&Weak.t3 The type of arrays of weak pointers (weak arrays). A weak pointer is a value that the garbage collector may erase whenever the value is not used any more (through normal pointers) by the program. Note that finalisation functions are run before the weak pointers are erased, because the finalisation functions can make values alive again (before 4.03 the finalisation functions were run after).@ j A weak pointer is said to be full if it points to a value, empty if the value was erased by the GC.@* Notes: ?Integers are not allocated and cannot be stored in weak arrays.@ &Weak arrays cannot be marshaled using 3Stdlib.output_value@@? nor the functions of the 'Marshal@@( module.@@@@@@@@@@@@@@O@@A@@@@+Weak.create3-Weak.create n $ returns a new weak array of length !n *. All the pointers are initially empty.@@@@@@@@0Invalid_argument#if !n & is not comprised between zero and =Obj.Ephemeron.max_ephe_length@@3 (limits included).@@@@@@ @@@@+Weak.length3.Weak.length ar / returns the length (number of elements) of "ar!.@@@@@@@@@@@@@@@@@(Weak.set37Weak.set ar n (Some el)* sets the !n+th cell of "ar> to be a (full) pointer to "el"; 2Weak.set ar n None* sets the !n.th cell of "ar* to empty.@@@@@@@@0Invalid_argument#if !n= is not in the range 0 to TD@' ar - 1!.@@@@@<@d=@g/@j+@@@@ (Weak.get3-Weak.get ar n5 returns None if the !n+th cell of "ar. is empty, &Some x( (where !x= is the value) if it is full.@@@@@@@@0Invalid_argument#if !n= is not in the range 0 to D@' ar - 1!.@@@@@Q@R@D@@@@<-Weak.get_copy32Weak.get_copy ar n5 returns None if the !n+th cell of "ar. is empty, &Some x( (where !x is a (shallow) copy of the value) if it is full. In addition to pitfalls with mutable values, the interesting difference with #get) is that (get_copy X does not prevent the incremental GC from erasing the value in its current cycle (#get - may delay the erasure to the next GC cycle).@@@@@@@@0Invalid_argument#if !n= is not in the range 0 to D@' ar - 1!.@ 6 If the element is a custom block it is not copied.@@@@@@@v@@@@n*Weak.check3/Weak.check ar n) returns $true( if the !n+th cell of "ar- is full, %false $ if it is empty. Note that even if /Weak.check ar n, returns $true/, a subsequent ʐD@% ar n, can return $None!.@@@@@@@@0Invalid_argument#if !n= is not in the range 0 to ND@' ar - 1!.@@@@@@^@a@@@@)Weak.fill37Weak.fill ar ofs len el) sets to "el1 all pointers of "ar) from #ofs$ to -ofs + len - 1!.@@@@@@@@0Invalid_argument#if #ofs% and #len & do not designate a valid subarray of "ar!.@@@@@@@@@@@@@)Weak.blit3?Weak.blit ar1 off1 ar2 off2 len( copies #len7 weak pointers from #ar1. (starting at $off1%) to #ar2. (starting at $off2 !). It works correctly even if #ar1% and #ar2. are the same.@@@@@@@@0Invalid_argument#if $off1% and #len ) do not designate a valid subarray of #ar1(, or if $off2% and #len ) do not designate a valid subarray of #ar2!.@@@@@@@@@@@@@@A@.Weak hash sets@@  A weak hash set is a hashed set of values. Each value may magically disappear from the set when it is not used by the rest of the program any more. This is normally used to share data structures without inducing memory leaks. Weak hash sets are defined on values from a 2Hashtbl.HashedType@@1 module; the %equal. relation and $hash < function are taken from that module. We will say that !v3 is an instance of !x$ if )equal x v( is $true!.@) The %equal z relation must be able to work on a shallow copy of the values and give the same result as with the values themselves.@7Unsynchronized accesses@@  Unsynchronized accesses to weak hash sets are a programming error. Unsynchronized accesses to a weak hash set may lead to an invalid weak hash set state. Thus, concurrent accesses to weak hash sets must be synchronized (for instance with a 'Mutex.t@@").@&Weak.S3 $The output signature of the functor )Weak.Make@@!.@@@@@@@@@@@@GAᐐ#+Weak.S.data3 -The type of the elements stored in the table.@@@@@@@@@@@@@@A@@ON@@#(Weak.S.t3 1The type of tables that contain elements of type $data E. Note that weak hash sets cannot be marshaled using 3Stdlib.output_value@@9 or the functions of the 'Marshal@@0 module.@@@@@@@@@@@@@@A@@ed@@-Weak.S.create3(create n < creates a new empty weak hash set, of initial size !n !. The table will grow as needed.@@@@@@@@@@@@p@q@@@@d,Weak.S.clear3 #Remove all elements from the table.@@@@@@@@@@@@e@f@@@@Y,Weak.S.merge3)merge t x8 returns an instance of !x* found in !t> if any, or else adds !x$ to !t, and return !x!.@@@@@@@@@@@@{@|@ s@@@@a*Weak.S.add3'add t x& adds !x$ to !t .. If there is already an instance of !x$ in !t N, it is unspecified which one will be returned by subsequent calls to $find% and %merge!.@@@@@@@@@@@@@?@B@@@@t-Weak.S.remove3*remove t x. removes from !t1 one instance of !x 3. Does nothing if there is no instance of !x$ in !t!.@@@@@@@@@@@@@l@o@@@@{+Weak.S.find3(find t x8 returns an instance of !x* found in !t!.@@@@@@@@)Not_found n+1) t 0 B but does not delay the deallocation of the dead elements.@@@@@@@@@@@@v@w@@@@j,Weak.S.stats3 Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.@@@@@@@@@@@@k@l@@@@8@@65@/13 GFunctor building an implementation of the weak hash set structure. 'H.equal j can't be the physical equality, since only shallow copies of the elements in the set are given to it.@@@@@@@@@@@@A;&Stdlib'Hashtbl*HashedType2Hashtbl.HashedType9Stdlib.Hashtbl.HashedType@FH5 with type data = H.t@%8@@@@@@@!@@AN@@@@@