Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] User-defined equality on types?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <frisch@c...>
Subject: Re: [Caml-list] User-defined equality on types?
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