From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA06637 for caml-redistribution; Mon, 12 Oct 1998 19:31:48 +0200 (MET DST) 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 TAA10579 for ; Mon, 12 Oct 1998 19:08:54 +0200 (MET DST) Received: from mail2.javanet.com (mail2.javanet.com [205.219.162.11]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA17342 for ; Mon, 12 Oct 1998 19:08:50 +0200 (MET DST) Received: from adam (www.chainwave.com [199.103.225.225]) by mail2.javanet.com (8.8.8/8.7) with SMTP id NAA02936 for ; Mon, 12 Oct 1998 13:08:50 -0400 (EDT) From: "Adam P. Jenkins" To: Subject: RE: Local definitions Date: Mon, 12 Oct 1998 13:20:11 -0400 Message-ID: <000901bdf604$917ea4a0$1301a8c0@adam> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal In-Reply-To: <19981012133903.58898@pauillac.inria.fr> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: weis > -----Original Message----- > From: Pierre.Weis@inria.fr [mailto:Pierre.Weis@inria.fr]On Behalf Of > Xavier Leroy > > Why CaML doesn't not allow the following style of local definitions: > > [...] > > or, the second variant: simply allow declaration of > > types, exceptions, open statements and others in "let-in" > > expressions with the same translation: > > I think types and exceptions are best handled at the level of > modules, if necessary by creating a sub-structure to restrict their scope. > > I've never found a convincing example of a type or exception > declaration local to an expression. I agree, I can't think of a situation offhand where I'd NEED a local type. One thing that I do miss from standard ML though is "let open Module in...". Often I just want to open a module inside one function rather than at module level. Adam