From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: *** X-Spam-Status: No, score=3.4 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 79BECBC30 for ; Wed, 4 Mar 2009 14:39:07 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8BACcRrkleZLBVmGdsb2JhbACVAAEBAQEBBgsMBxHCNIJ0gRQG X-IronPort-AV: E=Sophos;i="4.38,301,1233529200"; d="scan'208";a="22033612" Received: from mx71.mail.ru ([94.100.176.85]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Mar 2009 14:31:03 +0100 Received: from [82.204.181.180] (port=53976 helo=[10.1.2.9]) by mx71.mail.ru with asmtp id 1LerBe-000FIG-00 for caml-list@yquem.inria.fr; Wed, 04 Mar 2009 16:31:02 +0300 Message-ID: <49AE8296.5040009@mail.ru> Date: Wed, 04 Mar 2009 16:31:02 +0300 From: Vsevolod Fedorov User-Agent: Thunderbird 2.0.0.19 (X11/20090111) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: recursive records with weak hashtbl Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok X-Spam: no; 0.00; recursive:01 hashtbl:01 hash:01 mutable:01 mutable:01 int:01 int:01 define:02 referenced:02 string:02 string:02 hints:04 declarations:04 weak:06 weak:06 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