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=1.6 required=5.0 tests=AWL,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 B1498BBAF for ; Mon, 19 Jan 2009 20:34:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIBALNkdEnVhjEYkWdsb2JhbACUBwEBAQEJCwoHEQO9NoVz X-IronPort-AV: E=Sophos;i="4.37,290,1231110000"; d="scan'208";a="19840356" Received: from ihsmtp02voda.lis.interhost.com (HELO ihsmtp02cons.lis.interhost.com) ([213.134.49.24]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Jan 2009 20:34:41 +0100 Received: from [192.168.1.64] ([77.54.249.136]) by ihsmtp02cons.lis.interhost.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 19 Jan 2009 19:32:03 +0000 Message-ID: <4974D5CB.1030104@inescporto.pt> Date: Mon, 19 Jan 2009 19:34:35 +0000 From: Hugo Ferreira User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Jacques Carette Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Defining type that requires hashtables with recursive definition References: <4974B7AA.9010004@inescporto.pt> <4974B98E.4020700@mcmaster.ca> In-Reply-To: <4974B98E.4020700@mcmaster.ca> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Jan 2009 19:32:03.0469 (UTC) FILETIME=[9B248BD0:01C97A6C] X-Spam: no; 0.00; hashtables:01 recursive:01 node:01 node:01 hashtable:01 hashtbl:01 beginner's:01 ocaml:01 bug:01 equality:01 beginners:01 wrote:01 wrote:01 caml-list:01 caml-list:01 Jacques Carette wrote: > Hugo Ferreira wrote: >> I am attempting to define a type so: >> >> type node = >> | Node of links >> | Leaf of int >> >> And I want to implement links as a >> hashtable whose keys and values are >> also of type node. > > type node = > | Node of links > | Leaf of int > and links = (node, node) Hashtbl.t > > should do it. > I already had considered this but I assume that the hash-table equality is a structural comparison and not the (==) that I need. Thanks for the suggestion. R. Hugo F. > Jacques > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >