From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 831597F778 for ; Fri, 13 May 2016 09:52:52 +0200 (CEST) IronPort-PHdr: 9a23:J85N3BUiu21S4ja9FkVig2jxZBrV8LGtZVwlr6E/grcLSJyIuqrYZhOCt8tkgFKBZ4jH8fUM07OQ6PCxHzZYqs/b6DgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oM2CJV8Qz2PnOftbF1afk0b4joEum4xsK6I8mFPig0BjXKBo/15uPk+ZhB3m5829r9ZJ+iVUvO89pYYbCf2pN/dwcbsNRj8vNmRw4MzwqTHCSxGO7z0SSC9exhFBBgyA6BDhQr/wtDH7v6xzwn/JE9fxSOV+YjOv4LtxTweswAIGPD4w/WWdwph1jalbqR+l4Qd4zoHIeoaNHPt4Yq7ZO9gdQDwSDY5qSyVdD9bkPMM0BO0bMLMAog== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=michael.soegtrop@intel.com; spf=Pass smtp.mailfrom=michael.soegtrop@intel.com; spf=None smtp.helo=postmaster@mga02.intel.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of michael.soegtrop@intel.com) identity=pra; client-ip=134.134.136.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of michael.soegtrop@intel.com designates 134.134.136.20 as permitted sender) identity=mailfrom; client-ip=134.134.136.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mga02.intel.com) identity=helo; client-ip=134.134.136.20; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="postmaster@mga02.intel.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D5AABihzVXkBSIhoZegmyBIX4GpxeSVoF2FwEChXoCgS86EgEBAQEBAQEBEQEBAQEHDQkJISQLgi2CHC0cQgEMHlYmAQQbE4gTAZ4KoFwxhiaIVzaCRgtAGIIuBZgiBQGBLpwIj0EmAYI/EgqBS26HWwF+AQEB X-IPAS-Result: A0D5AABihzVXkBSIhoZegmyBIX4GpxeSVoF2FwEChXoCgS86EgEBAQEBAQEBEQEBAQEHDQkJISQLgi2CHC0cQgEMHlYmAQQbE4gTAZ4KoFwxhiaIVzaCRgtAGIIuBZgiBQGBLpwIj0EmAYI/EgqBS26HWwF+AQEB X-IronPort-AV: E=Sophos;i="5.24,613,1454972400"; d="scan'208,217";a="218124480" Received: from mga02.intel.com ([134.134.136.20]) by mail2-smtp-roc.national.inria.fr with ESMTP; 13 May 2016 09:52:51 +0200 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 13 May 2016 00:52:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,613,1455004800"; d="scan'208,217";a="965699296" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga001.fm.intel.com with ESMTP; 13 May 2016 00:52:49 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.35]) by IRSMSX152.ger.corp.intel.com ([169.254.6.54]) with mapi id 14.03.0248.002; Fri, 13 May 2016 08:52:48 +0100 From: "Soegtrop, Michael" To: "caml-list@inria.fr" Thread-Topic: Specify the default hash function for a type Thread-Index: AdGs7HCGm9QdbZDXQnOXFTEowCMUzw== Date: Fri, 13 May 2016 07:52:47 +0000 Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A172CEF1630@IRSMSX102.ger.corp.intel.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: multipart/alternative; boundary="_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEF1630IRSMSX102gercor_" MIME-Version: 1.0 Subject: [Caml-list] Specify the default hash function for a type --_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEF1630IRSMSX102gercor_ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Dear Ocaml Users, I wonder if there is a way to specify a default hash function for a type, w= hich 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 ha= ppy 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 --_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEF1630IRSMSX102gercor_ Content-Type: text/html; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable

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 abou= t 10 fields and I am happy with the default hash functions for most fields and for the record, but for just on= e 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 th= ere is a solution with Batteries or Core, I would also be interested.<= /o:p>

 

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

--_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEF1630IRSMSX102gercor_--