From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA24181; Thu, 19 Apr 2001 21:57:41 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA23914 for ; Thu, 19 Apr 2001 21:57:40 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f3JJveL13295 for ; Thu, 19 Apr 2001 21:57:40 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id f3JJvdq87396 ; Thu, 19 Apr 2001 21:57:39 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.9.2/jb-1.1) id VAA27101 ; Thu, 19 Apr 2001 21:57:39 +0200 (MET DST) Date: Thu, 19 Apr 2001 21:57:39 +0200 (MET DST) From: Alain Frisch To: John R Harrison cc: caml-list@inria.fr Subject: Re: [Caml-list] User-defined equality on types? In-Reply-To: <200104181942.MAA05265@dhpc0010.pdx.intel.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 18 Apr 2001, John R Harrison wrote: > I'd like to suggest allowing the user to define a chosen interpretation > of the equality symbol, and perhaps the polymorphic orderings too, on > each new (maybe just abstract) data type. This seems natural in the > context of abstract data types with non-canonical representation, giving > a kind of quotient type. [snip] > Any opinions? I support this suggestion. The standard equality/ordering/hashing functions are often adequate for most of the data structures, and it would be useful to use them and just place a hook on specific types to provide specialized implementation. It could almost be done with the "custom" block tag; the problem is that such blocks are not garbage collected. What about "custom Caml blocks" ? -- Alain Frisch ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr