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 RAA22570; Wed, 9 Apr 2003 17:59:53 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA22535 for caml-list@pauillac.inria.fr; Wed, 9 Apr 2003 17:59:52 +0200 (MET DST) 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 JAA04753 for ; Wed, 9 Apr 2003 09:44:13 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h397iCX03786 for ; Wed, 9 Apr 2003 09:44:12 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.12.9/1.01.28121999) with ESMTP id h397iCbX082955 ; Wed, 9 Apr 2003 09:44:12 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id h397iBhw024325 ; Wed, 9 Apr 2003 09:44:11 +0200 (MET DST) X-Authentication-Warning: clipper.ens.fr: frisch owned process doing -bs Date: Wed, 9 Apr 2003 09:44:11 +0200 (MET DST) From: Alain.Frisch@ens.fr X-X-Sender: frisch@clipper.ens.fr Reply-To: Alain.Frisch@ens.fr To: Jean-Christophe Filliatre cc: Lukasz Lew , Caml list Subject: Re: [Caml-list] Feature request. In-Reply-To: <16019.48771.767140.795030@gargle.gargle.HOWL> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam: no; 0.00; alain:01 frisch:01 caml-list:01 filliatre:01 soundness:01 struct:01 module':01 escapes:01 ocaml:01 sml:01 exception:02 modules:02 module:03 wrote:03 types:03 X-Spam: no; 0.00; alain:01 frisch:01 caml-list:01 filliatre:01 soundness:01 struct:01 module':01 escapes:01 ocaml:01 sml:01 exception:02 modules:02 module:03 wrote:03 types:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 9 Apr 2003, Jean-Christophe Filliatre wrote: > In SML, there used to be local exceptions (exception E in ...) and it > was breaking type soundness, since an exception could obviously escape > the scope of its declaration What kind of type unsoundness ? A local exception cannot be matched outside its scope (except by match-all pattern, of course), and that's all. > I guess that with a "type ... in" construct, a type could probably > escape its scope the same way, leading to serious issues in assigning > legal types to expressions. This is exactly the same issue as for local modules, and OCaml can detect it. # let module A = struct type t = X end in A.X;; This `let module' expression has type A.t In this type, the locally bound module name A escapes its scope -- Alain ------------------- 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