Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
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	[thread overview]
Message-ID: <200705211652.10723.jon@ffconsultancy.com> (raw)
In-Reply-To: <4651B460.60408@informatik.uni-freiburg.de>

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


  reply	other threads:[~2007-05-21 15:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 15:01 Phillip Heidegger
2007-05-21 15:52 ` Jon Harrop [this message]
2007-05-21 16:42   ` [Caml-list] " Phillip Heidegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200705211652.10723.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox