From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA13063 for caml-red; Thu, 3 Aug 2000 15:14:48 +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 UAA32032 for ; Wed, 2 Aug 2000 20:35:02 +0200 (MET DST) Received: from takayama.mt.cs.cmu.edu (TAKAYAMA.MT.CS.CMU.EDU [128.2.179.102]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e72IZ1b27419 for ; Wed, 2 Aug 2000 20:35:01 +0200 (MET DST) Received: (from md5i@localhost) by takayama.mt.cs.cmu.edu (AIX4.3/UCB 8.8.8/8.8.8) id OAA26648; Wed, 2 Aug 2000 14:34:59 -0400 X-Authentication-Warning: takayama.mt.cs.cmu.edu: md5i set sender to md5i@cs.cmu.edu using -f To: caml-list@inria.fr Subject: Recursive Sets? From: Michael Welsh Duggan Date: 02 Aug 2000 14:34:59 -0400 In-Reply-To: Alan Schmitt's message of "Tue, 25 Jul 2000 07:26:20 +0200" Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: weis@pauillac.inria.fr I have been trying to create a recursive type which can express sets of itself. The following code is not meant to be correct (it isn't), but hopefully expresses the sort of thing I want to do. Can someone throw some ideas at me? type foo = | A | B | Set of FooSet.t module OrderedFoos = struct type t = foo let compare (a:t) (b:t) = compare a b end module FooSet = Set.Make(OrderedFoos) -- Michael Duggan (md5i@cs.cmu.edu)