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 LAA24972; Wed, 17 Apr 2002 11:18:50 +0200 (MET DST) 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 LAA17675 for ; Wed, 17 Apr 2002 11:18:49 +0200 (MET DST) Received: from indigo.recherche.enac.fr (indigo.recherche.enac.fr [195.220.158.66]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3H9Imb25001 for ; Wed, 17 Apr 2002 11:18:48 +0200 (MET DST) Received: from recherche.enac.fr (beige.recherche.enac.fr [10.31.1.89]) by indigo.recherche.enac.fr (Postfix) with ESMTP id 4124CB853; Wed, 17 Apr 2002 11:18:48 +0200 (CEST) Message-ID: <3CBD3DF8.BE7B1D6E@recherche.enac.fr> Date: Wed, 17 Apr 2002 11:18:48 +0200 From: Nicolas barnier Reply-To: barnier@recherche.enac.fr X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.12 i686) X-Accept-Language: en MIME-Version: 1.0 To: Garry Hodgson Cc: ocaml Subject: Re: [Caml-list] what does this mean? References: <3CBC5F37.1DC83003@sage.att.com> <3CBC64F8.B677F621@recherche.enac.fr> <3CBC7B46.9EB83B57@sage.att.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Garry Hodgson wrote: > > no, i hadn't thought of that. works fine now. thanks! After thinking about it, I figured out a better explanation for this restriction. Suppose you have the following code: let h = Hashtbl.create 10 module M = (struct type t = A let _ = Hashtbl.add h 0 A end : sig end) let t = Hashtbl.get h 0 then type t would be visible outside M, whereas module M, restricted by its signature, does not export it. I think this is the meaning of the error message: "The type constructor t would escape its scope". So it rather is a safe restriction. Regards -- Nicolas ------------------- 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