Module Hash.Builtin

val hash_fold_nativeint : 'a folder
val hash_fold_int64 : 'a folder
val hash_fold_int32 : 'a folder
val hash_fold_char : 'a folder
val hash_fold_int : 'a folder
val hash_fold_bool : 'a folder
val hash_fold_string : 'a folder
val hash_fold_float : 'a folder
val hash_fold_unit : 'a folder
val hash_fold_option : 'a folder -> 'a folder
val hash_fold_list : 'a folder -> 'a folder
val hash_fold_lazy_t : 'a folder -> 'a folder
val hash_fold_ref_frozen : 'a folder -> 'a folder

Hash support for array and ref is provided, but is potentially DANGEROUS, since it incorporates the current contents of the array/ref into the hash value. Because of this we add a _frozen suffix to the function name.

Hash support for string is also potentially DANGEROUS, but strings are mutated less often, so we don't append _frozen to it.

Also note that we don't support bytes.

val hash_fold_array_frozen : 'a folder -> 'a folder
val hash_nativeint : nativeint -> hash_value
val hash_int64 : int64 -> hash_value
val hash_int32 : int32 -> hash_value
val hash_char : char -> hash_value
val hash_int : int -> hash_value
val hash_bool : bool -> hash_value
val hash_string : string -> hash_value
val hash_float : float -> hash_value
val hash_unit : unit -> hash_value