Dear Ocaml Users,

 

I wonder if there is a way to specify a default hash function for a type, which is then used by the automated hash functions e.g. created for records containing this type. I have e.g. a record with about 10 fields and I am happy with the default hash functions for most fields and for the record, but for just one field I would like to use a custom hash function, but I don’t want to write a hash function for the record.

 

I am currently using the standard library, but if there is a solution with Batteries or Core, I would also be interested.

 

Best regards,

 

Michael

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928