From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 18330BC0A for ; Mon, 21 May 2007 17:57:57 +0200 (CEST) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4LFvukf019614 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 21 May 2007 17:57:56 +0200 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay01.plus.net with esmtp (Exim) id 1HqAGh-0000f0-FE for caml-list@yquem.inria.fr; Mon, 21 May 2007 16:57:55 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] a question about recursiv type defintions and functors like Set.Make? Date: Mon, 21 May 2007 16:52:10 +0100 User-Agent: KMail/1.9.6 References: <4651B460.60408@informatik.uni-freiburg.de> In-Reply-To: <4651B460.60408@informatik.uni-freiburg.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705211652.10723.jon@ffconsultancy.com> X-Miltered: at concorde with ID 4651C184.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functors:01 functor:01 ocaml:01 recursive:01 sig:01 val:01 struct:01 sig:01 val:01 fsharp:01 phillip:98 frog:98 beginners:01 wrote:01 faq:01 On Monday 21 May 2007 16:01:52 Phillip Heidegger wrote: > I have a question about using the set functor. This is a FAQ. From a post of mine (on 1st May 2007) on the OCaml beginners list: Use mutually recursive modules: # module rec Tree : sig type t = Content of int * TreeSet.t val compare : t -> t -> int end = struct type t = Content of int * TreeSet.t let compare = compare end and TreeSet : Set.S = Set.Make(Tree);; sig type t = Content of int * TreeSet.t val compare : t -> t -> int end and TreeSet : Set.S -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The F#.NET Journal http://www.ffconsultancy.com/products/fsharp_journal/?e