caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Mutually recursive types and classes
@ 2003-06-19 17:45 Nick Name
  2003-06-19 22:16 ` Olivier Andrieu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nick Name @ 2003-06-19 17:45 UTC (permalink / raw)
  To: caml-list

Hi all,

I wish to declare a type like

type a = A of (b -> unit) | ...

where b is a class like

class b = 
object (this)
	method f : a -> unit = 
		function 
		  A f -> f this
                | _ -> unit
end

or, alternatively:

class b =
object 
   inherit [a] otherclass
   ...
end

How can I do such a thing, considering that I can't write an "and"
keyword between a type declaration and a class (or class type)
declaration?

Thanks for help

Vincenzo

-------------------
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] 5+ messages in thread

end of thread, other threads:[~2003-06-20 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-19 17:45 [Caml-list] Mutually recursive types and classes Nick Name
2003-06-19 22:16 ` Olivier Andrieu
2003-06-19 22:39 ` brogoff
2003-06-20 11:07   ` Nick Name
2003-06-20  3:15 ` 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).