caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* recursive records with weak hashtbl
@ 2009-03-04 13:31 Vsevolod Fedorov
  2009-03-04 13:55 ` [Caml-list] " Florent Ouchet
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Vsevolod Fedorov @ 2009-03-04 13:31 UTC (permalink / raw)
  To: caml-list

Hello!

I want to define two records referencing each other. First record (A)
has direct reference to second (B) and second (B) has weak hash table to
list records A, which have reference to it. For example (pseudo code):

type a
{
  id : int ;
  mutable field1 : string;
  mutable b : B;
}
type b
{
    id : int;
    mutable field2 : string;
    a_list : Weak-Hashtbl(a);  (* they referenced me *)
}

Is it possible at all?
Is it possible with A and B declarations in separate files?

Any hints and references are welcomed.
Thanks in advance.

Seva


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

end of thread, other threads:[~2009-03-04 14:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04 13:31 recursive records with weak hashtbl Vsevolod Fedorov
2009-03-04 13:55 ` [Caml-list] " Florent Ouchet
2009-03-04 14:00 ` Virgile Prevosto
2009-03-04 14:00 ` Martin Jambon
2009-03-04 14:11 ` Christophe TROESTLER

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