ocaml-batteries-team/batteries-included — Issue #173: BatHashtbl.remove_all
Author: edmcman
Created: 2011-10-12 19:46:16+00:00
State: open

I am experiencing bizarre behavior with BatHashtbl.remove_all.

I am creating a custom BatHashtbl using H=BatHashtbl.Make(Spec).

After running H.remove_all tbl key, H.find_all tbl key does not return [] as I expected. However, this code acts as expected, removing all keys:

```
while H.mem tbl key do
H.remove tbl key
done;
```

One interesting thing about my keys are that equality is physical equality, and hashing is done by a unique integer embedded into the type. Could these make problems for the implementation of remove_all?

I am trying to understand the BatHashtbl implementation, but there are external functions like h_conv and to_hash that I can't find. If someone could point me to the definitions, it would help me debug this.