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 KAA23712; Tue, 24 Apr 2001 10:33:23 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA23786 for ; Tue, 24 Apr 2001 10:33:22 +0200 (MET DST) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f3O8XKP01477 for ; Tue, 24 Apr 2001 10:33:20 +0200 (MET DST) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.11.3/2001032800) with ESMTP id f3O8X9e21361; Tue, 24 Apr 2001 10:33:10 +0200 (CEST) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by cs.uni-sb.de (8.11.3/2001041100) with ESMTP id f3O8XAG19133; Tue, 24 Apr 2001 10:33:10 +0200 (CEST) Received: from ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.11.3/2001041100) with ESMTP id f3O8XAk03440; Tue, 24 Apr 2001 10:33:10 +0200 (CEST) X-Authentication-Warning: email: Host grizzly.ps.uni-sb.de [134.96.186.68] claimed to be ps.uni-sb.de Received: from ps.uni-sb.de (zoidberg.ps.uni-sb.de [134.96.186.121]) by ps.uni-sb.de (8.11.0/8.11.0) with ESMTP id f3O8X9023343; Tue, 24 Apr 2001 10:33:09 +0200 Message-ID: <3AE53A45.C065BFDB@ps.uni-sb.de> Date: Tue, 24 Apr 2001 10:33:09 +0200 From: Andreas Rossberg Organization: =?iso-8859-1?Q?Universit=E4t?= des Saarlandes X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-14 i686) X-Accept-Language: de, en MIME-Version: 1.0 To: caml-list@inria.fr CC: Brian Rogoff Subject: Re: [Caml-list] User-defined equality on types? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Rogoff wrote: > > On Mon, 23 Apr 2001, Xavier Leroy 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. Has this ever been considered? > > > > Yes. This was one of the first motivations for Haskell type classes, > > I believe. > > Would the proposed generic polymorphism extension solve this problem? Probably not, because unlike type classes generic functions are closed and do not allow adding cases for new types later on. -- Andreas Rossberg, rossberg@ps.uni-sb.de "Computer games don't affect kids. If Pac Man affected us as kids, we would all be running around in darkened rooms, munching pills, and listening to repetitive music." ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr