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 HAA24844; Mon, 10 Dec 2001 07:17:04 +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 HAA24825 for ; Mon, 10 Dec 2001 07:17:03 +0100 (MET) Received: from d12lmsgate.de.ibm.com (d12lmsgate.de.ibm.com [195.212.91.199]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBA63KT28610 for ; Mon, 10 Dec 2001 07:08:45 +0100 (MET) Received: from d12relay01.de.ibm.com (d12relay01.de.ibm.com [9.165.215.22]) by d12lmsgate.de.ibm.com (1.0.0) with ESMTP id NAA199628 for ; Sun, 9 Dec 2001 13:14:05 +0100 Received: from d10hubm1.telaviv.ibm.com (d10ml001.telaviv.ibm.com [9.148.216.55]) by d12relay01.de.ibm.com (8.11.1m3/NCO v5.01) with ESMTP id fB9CESN101810 for ; Sun, 9 Dec 2001 13:14:28 +0100 Importance: Normal Subject: [Caml-list] Mutability analysis too strict? To: caml-list@inria.fr X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: "Ohad Rodeh" Date: Sun, 9 Dec 2001 14:14:19 +0200 X-MIMETrack: Serialize by Router on D10ML001/10/M/IBM(Release 5.0.8 |June 18, 2001) at 09/12/2001 14:14:24 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk List, I have a problem with the mutability analysis for hash-tables. For example: let h = Hashtbl.create 10 ;; creates: h : ('_a, '_b) Hashtbl.t instead of: h ('a, 'b) Hashtbl.t My specific hashtable contains immutable objects that can be added and removed to the table. The default analysis is too strict, forcing me to use Obj.magic for coercion ('_b -> 'b). This is safe in this case, because I know the objects are immutable. However, in the general case, I don't see why it is neccessary. Anyone cares to explain? Ohad. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr