From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA02780; Wed, 6 Mar 2002 09:33:57 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA01363 for ; Wed, 6 Mar 2002 09:33:57 +0100 (MET) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g268XuL09415 for ; Wed, 6 Mar 2002 09:33:56 +0100 (MET) Received: from pc803.lri.fr (mail@pc803 [129.175.8.114]) by lri.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id g268XrF10231 ; Wed, 6 Mar 2002 09:33:54 +0100 (MET) Received: from filliatr by pc803.lri.fr with local (Exim 3.33 #1 (Debian)) id 16iWrz-0006cb-00; Wed, 06 Mar 2002 09:33:55 +0100 From: Jean-Christophe Filliatre MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LasXgCodAm" Content-Transfer-Encoding: 7bit Message-ID: <15493.54386.780519.557241@pc803.lri.fr> Date: Wed, 6 Mar 2002 09:33:54 +0100 (MET) To: Christophe Raffalli Cc: caml-list@inria.fr Subject: Re: [Caml-list] Weak hash table In-Reply-To: <3C84F214.C42D6891@univ-savoie.fr> References: <1018858024.741.2.camel@node89> <3C84F214.C42D6891@univ-savoie.fr> X-Mailer: VM 6.49 under Emacs 20.7.2 Reply-To: Jean-Christophe.Filliatre@lri.fr (Jean-Christophe Filliatre) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --LasXgCodAm Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Christophe Raffalli writes: > > did anyone implemented weak hash table using weak pointers in OCaml ? > > I need that, and if I can save work ... I did it once, but a very naive implementation with only functions "create", "add" and "find" (I finally ended using some other data structure, so I didn't pursue). Anyhow, I attach these two small files. -- Jean-Christophe Filliātre (http://www.lri.fr/~filliatr) --LasXgCodAm Content-Type: application/octet-stream Content-Description: whash.mi Content-Disposition: attachment; filename="whash.mli" Content-Transfer-Encoding: base64 CnR5cGUgKCdhLCdiKSB0Cgp2YWwgY3JlYXRlIDogaW50IC0+ICgnYSwnYikgdAoKdmFsIGFk ZCA6ICgnYSwnYikgdCAtPiAnYSAtPiAnYiAtPiB1bml0Cgp2YWwgZmluZCA6ICgnYSwnYikg dCAtPiAnYSAtPiAnYgoKCg== --LasXgCodAm Content-Type: application/octet-stream Content-Description: whash.ml Content-Disposition: attachment; filename="whash.ml" Content-Transfer-Encoding: base64 CnR5cGUgKCdhLCdiKSB0ID0gKCdhICogJ2IpIGxpc3QgV2Vhay50CgpsZXQgY3JlYXRlID0g V2Vhay5jcmVhdGUKCmxldCBhZGQgdCB4IHkgPQogIGxldCBuID0gV2Vhay5sZW5ndGggdCBp bgogIGxldCBpID0gKEhhc2h0YmwuaGFzaCB4KSBtb2QgbiBpbgogIGxldCBvbGQgID0gbWF0 Y2ggV2Vhay5nZXQgdCBpIHdpdGgKICAgIHwgTm9uZSAtPiBbXQogICAgfCBTb21lIGwgLT4g bAogIGluCiAgV2Vhay5zZXQgdCBpIChTb21lICgoeCx5KSA6OiBvbGQpKQoKbGV0IGZpbmQg dCB4ID0KICBsZXQgbiA9IFdlYWsubGVuZ3RoIHQgaW4KICBsZXQgaSA9IChIYXNodGJsLmhh c2ggeCkgbW9kIG4gaW4KICBtYXRjaCBXZWFrLmdldCB0IGkgd2l0aAogICAgfCBOb25lIC0+ IHJhaXNlIE5vdF9mb3VuZAogICAgfCBTb21lIGwgLT4gTGlzdC5hc3NvYyB4IGwK --LasXgCodAm-- ------------------- 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