Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Recursive Sets?
@ 2000-08-02 18:34 Michael Welsh Duggan
  2000-08-03 13:55 ` Markus Mottl
  2000-08-09  0:25 ` Jean-Christophe Filliatre
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Welsh Duggan @ 2000-08-02 18:34 UTC (permalink / raw)
  To: caml-list

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)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-09 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-02 18:34 Recursive Sets? Michael Welsh Duggan
2000-08-03 13:55 ` Markus Mottl
2000-08-09  0:25 ` Jean-Christophe Filliatre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox