File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 18
18
(* See the GNU Lesser General Public License version 2.1 *)
19
19
(* for more details (enclosed in the file LICENSE). *)
20
20
(* *************************************************************************)
21
- exception Not_found
21
+
22
22
(* * Association maps from key to values, and sets, implemented with
23
23
Patricia Trees, allowing fast merge operations by making use of
24
24
physical equality between subtrees; and custom implementation of
Original file line number Diff line number Diff line change @@ -1320,6 +1320,9 @@ module MakeBucketedHeterogeneous
1320
1320
let set = Array. unsafe_set
1321
1321
1322
1322
let empty = Obj. magic (Array. make Buckets. nb_buckets Map. empty)
1323
+ (* This Obj.magic is required to avoid the '_weak type.
1324
+ It is correct as long as we never mutate empty without copying it first. *)
1325
+ let empty : 'a t = empty
1323
1326
1324
1327
let is_empty arr = Array. for_all Map. is_empty arr
1325
1328
let cardinal arr = Array. fold_left (fun a b -> a + Map. cardinal b) 0 arr
You can’t perform that action at this time.
0 commit comments