caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Mixed class / type
@ 2002-01-30 16:03 Warp
  2002-01-30 16:52 ` Remi VANICAT
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Warp @ 2002-01-30 16:03 UTC (permalink / raw)
  To: OCaml

Hello,

I got this problem :
- two classes called wmenu and wmenuitem, are mutaly recursive
- one wmenuitem can be constructed either with a wmenu or with a wmenuitem

so I need a type like this :

type menu =
    Mainmenu of wmenu
    | Menuitem of wmenuitem

So I tryied :

type menu = .....
and
    class wmenuitem : menu -> object ... end
and
    class wmenu : object ... end

But it doesn't work.
Any clue is welcomed.

Warp

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2002-02-04  2:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-30 16:03 [Caml-list] Mixed class / type Warp
2002-01-30 16:52 ` Remi VANICAT
2002-01-30 23:31 ` Jacques Garrigue
2002-02-01 10:33 ` Hendrik Tews
2002-02-04  2:40   ` Jacques Garrigue

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