From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E7B7FBC8C for ; Tue, 25 Jan 2005 19:37:41 +0100 (CET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0PIbehE013255 for ; Tue, 25 Jan 2005 19:37:41 +0100 Received: by wproxy.gmail.com with SMTP id 70so172182wra for ; Tue, 25 Jan 2005 10:37:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=oFazWdPbrzOHbt2Ja22uuivRDER9yoWT81IPenqQExBARsBwFSdab/lLO6jEEA+j52jX6nqDxZUHNkibk5/I9l6pf/zT0+G9NUY/1TRBrGeBXxG4Edq/WgjoTIDqE1iuKOB8InuIYbaw9O4V8wqpn0GLn1PRPXCTxJ6Xzk25rqU= Received: by 10.54.32.40 with SMTP id f40mr41080wrf; Tue, 25 Jan 2005 10:37:39 -0800 (PST) Received: by 10.54.37.73 with HTTP; Tue, 25 Jan 2005 10:37:39 -0800 (PST) Message-ID: Date: Tue, 25 Jan 2005 13:37:39 -0500 From: Brian Sniffen Reply-To: bts@alum.mit.edu To: Oliver Bandel Subject: Re: [Caml-list] local Open Cc: caml-list@yquem.inria.fr In-Reply-To: <20050125132740.GA321@first.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050125132740.GA321@first.in-berlin.de> X-Miltered: at nez-perce with ID 41F691F4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 oliver:01 bandel:01 oliver:01 in-berlin:01 wrote:01 ocaml:01 simulate:01 functor:01 functor:01 alum:98 syntactic:01 modules:01 module:03 brian:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Tue, 25 Jan 2005 14:27:40 +0100, Oliver Bandel wrote: > is it planned to have a local Open-statement in OCaml > in newer Versions? There is no local open because open is entirely syntactic. What you can do to simulate a local open is this: wrap your code in a module which is a functor. Provide as arguments the modules you wish to "locally open". Then you can write in those terms inside your functor. Also, be aware that "open" is only scoped to that file in which it occurs, and you can acheive similar effects with less writing by splitting your code into separate files. -- Brian T. Sniffen bts@alum.mit.edu or brian.sniffen@gmail.com http://www.evenmere.org/~bts