caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Recursive type and class
@ 2002-08-30 12:22 David Frese
  2002-08-31  3:25 ` John Max Skaller
  0 siblings, 1 reply; 2+ messages in thread
From: David Frese @ 2002-08-30 12:22 UTC (permalink / raw)
  To: Caml-list

Hello folks,

I have a problem with mixing a class and a type recursively. Written
down directly, I want to have something like this:

type atype = Obj of aclass | I of int

class aclass = object
  val mutable field0 : atype = I 5
end

But this does not work, of course. Can anyone tell me, how this can be
done?

Thanks, David.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2002-08-31  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-30 12:22 [Caml-list] Recursive type and class David Frese
2002-08-31  3:25 ` John Max Skaller

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).