caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mike Hamburg <hamburg@fas.harvard.edu>
To: caml-list@inria.fr
Subject: 'a Set?
Date: Tue, 25 Jan 2005 18:54:27 -0500	[thread overview]
Message-ID: <727068A7-6F2C-11D9-8411-0003939A19AA@fas.harvard.edu> (raw)

Is there any clean way to make a type 'a set, corresponding to Set.Make 
of a module with type t='a and compare=Pervasives.compare?  I'm trying 
to make a module which uses sets of arbitrary types of objects, and I 
don't want to have to make it a functor.

So in other words, I'd like to make a module AlphaSet with type
type 'a t,
val is_empty: 'a t -> bool
val mem: 'a -> 'a t -> bool,
etc.

instead of Set which is a functor producing
types t, elt
val is_empty: t -> bool
val mem: elt -> t -> bool,
etc.

Is there a clean way to do this without removing the code from set.ml 
and modifying it?

Mike Hamburg


             reply	other threads:[~2005-01-25 23:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25 23:54 Mike Hamburg [this message]
2005-01-26  8:25 ` [Caml-list] " Jean-Christophe Filliatre
2005-01-26 10:13   ` Frédéric Gava
2005-01-26 11:04     ` Radu Grigore
2005-01-26 12:04       ` Jacques Garrigue
2005-01-26 16:00         ` Alex Baretta
2005-01-26 16:14           ` Jacques Carette
2005-01-26 21:09           ` Mike Hamburg
2005-01-29  9:55         ` Radu Grigore
2005-01-26  9:13 ` Jon Harrop
2005-01-26 15:36   ` Frédéric Gava
2005-01-26 16:06     ` Jon Harrop
2005-01-26 14:07 Jeff Shaw

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=727068A7-6F2C-11D9-8411-0003939A19AA@fas.harvard.edu \
    --to=hamburg@fas.harvard.edu \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).