diff --git a/core/CCHash.ml b/core/CCHash.ml index 9432b588..17a53675 100644 --- a/core/CCHash.ml +++ b/core/CCHash.ml @@ -25,8 +25,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {1 Hash combinators} *) -type t = int64 -type 'a hash_fun = 'a -> t -> t +type t = int +type state = int64 +type 'a hash_fun = 'a -> state -> state let _r = 47 let _m = 0xc6a4a7935bd1e995L diff --git a/core/CCHash.mli b/core/CCHash.mli index 279c21f2..a5c61102 100644 --- a/core/CCHash.mli +++ b/core/CCHash.mli @@ -31,16 +31,20 @@ Combination of hashes based on the Murmur Hash (64 bits). See (** {2 Definitions} *) -type t = private int64 +type t = int +(** A hash value is a positive integer *) -type 'a hash_fun = 'a -> t -> t +type state = int64 +(** State required by the hash function *) + +type 'a hash_fun = 'a -> state -> state (** Hash function for values of type ['a], merging a fingerprint of the value into the state of type [t] *) -val init : t +val init : state (** Initial value *) -val finish : t -> int +val finish : state -> int (** Extract a usable hash value *) val apply : 'a hash_fun -> 'a -> int