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 PAA10153; Sun, 3 Nov 2002 15:33:56 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA11282 for ; Sun, 3 Nov 2002 15:33:54 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from sm206.163.com ([202.108.44.206]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gA3EXkD10140 for ; Sun, 3 Nov 2002 15:33:50 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by sm206.163.com (Postfix) with SMTP id ECBB81C92D219 for ; Sun, 3 Nov 2002 22:33:40 +0800 (CST) Received: from climbxp (unknown [159.226.149.121]) by 192.168.1.206 (Coremail) with SMTP id dWoAAMMzxT1zAZV5.2 for ; Sun, 03 Nov 2002 22:33:40 +0800 (CST) From: "climb" To: "caml-list@inria.fr" Subject: [Caml-list] how to open the type X-mailer: Foxmail 4.2 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Date: Sun, 3 Nov 2002 22:34:10 +0800 Message-Id: <20021103143340.ECBB81C92D219@sm206.163.com> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I want to use hashtable on my objects which all has a method get_string:string. but i can only write the code like these: module SeqHashType = struct type t= let equal s1 s2 = (String.uppercase s1#get_string =String.uppercase s2#get_string ) let hash s = Strex.hash s#get_string end module SeqHashtbl = Hashtbl.Make (SeqHashType) surely it is not what i want . i have tried type t= but i can not complie it , the complier says Unbound .. then how to open the type in the module SeqHashType ? or it can not be opened at this situation ? i am a newbie and a little puzzled at open types. Best regards Yours climb onlyclimb@163.com 2002-11-03 ------------------- 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