Skip to content

Commit 993d196

Browse files
committed
Small fixes
1 parent f3516c9 commit 993d196

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/PatriciaTree.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
(* See the GNU Lesser General Public License version 2.1 *)
1919
(* for more details (enclosed in the file LICENSE). *)
2020
(**************************************************************************)
21-
exception Not_found
21+
2222
(** Association maps from key to values, and sets, implemented with
2323
Patricia Trees, allowing fast merge operations by making use of
2424
physical equality between subtrees; and custom implementation of

src/functors.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,9 @@ module MakeBucketedHeterogeneous
13201320
let set = Array.unsafe_set
13211321

13221322
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
13231326

13241327
let is_empty arr = Array.for_all Map.is_empty arr
13251328
let cardinal arr = Array.fold_left (fun a b -> a + Map.cardinal b) 0 arr

0 commit comments

Comments
 (0)