From: Pietro Abate <Pietro.Abate@anu.edu.au>
To: caml-list@yquem.inria.fr, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] type troubles with functors
Date: Wed, 22 Jun 2005 16:48:36 +1000 [thread overview]
Message-ID: <20050622064836.GA27983@pulp.anu.edu.au> (raw)
In-Reply-To: <8ecdad970506212153417f77b5@mail.gmail.com>
what about
module type OrderedType = sig
type t
val compare : t -> t -> int
end
module type S = sig
type elt
type t
type set
val to_list : t -> elt list
val to_set : t -> set
end
module Make (Ord : OrderedType) : S = struct
module EltSet = Set.Make(Ord)
type elt = EltSet.elt
type set = EltSet.t
type t = { l : elt list; s : set }
let to_list t = t.l
let to_set t = t.s
end
I'm far to be an expert, but this (or something similar) should work.
p
--
++ Blog: http://blog.rsise.anu.edu.au/?q=pietro
++
++ "All great truths begin as blasphemies." -George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
next prev parent reply other threads:[~2005-06-22 6:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-22 4:53 Scott Duckworth
2005-06-22 6:48 ` Pietro Abate [this message]
2005-06-22 7:50 ` [Caml-list] " Virgile Prevosto
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=20050622064836.GA27983@pulp.anu.edu.au \
--to=pietro.abate@anu.edu.au \
--cc=caml-list@inria.fr \
--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