From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 61830D176 for ; Mon, 1 Aug 2005 03:47:50 +0200 (CEST) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j711lndI023526 for ; Mon, 1 Aug 2005 03:47:50 +0200 Received: by wproxy.gmail.com with SMTP id i21so918726wra for ; Sun, 31 Jul 2005 18:47:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ZlQ4yglEkmCEkAjefGHGlvBWKXSEdiBOu2p6J276pSUmIhPLaDGk9zY1tNsHNM+yj0vi3nF6QSxunSKqPGXO45lHKBLVkpib1g6xyOAVJve254WtF2OOcJi2eAyozFNLwCJrVm4PuJNdadcu08JkXFgIr0n55RYOZLcVi6qdW2g= Received: by 10.54.121.8 with SMTP id t8mr1590336wrc; Sun, 31 Jul 2005 18:47:43 -0700 (PDT) Received: by 10.54.15.66 with HTTP; Sun, 31 Jul 2005 18:47:43 -0700 (PDT) Message-ID: <4a708d20507311847380538ae@mail.gmail.com> Date: Mon, 1 Aug 2005 03:47:43 +0200 From: Lukasz Stafiniak Reply-To: Lukasz Stafiniak To: caml-list@yquem.inria.fr Subject: Local "open", or open locally Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at concorde with ID 42ED7F45.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lukasz:01 struct:01 struct:01 uglier:01 lukasz:01 expression:01 modules:01 construct:02 seems:03 seems:03 module:03 module:03 perhaps:03 let:03 let:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Dear list, What about a construct for opening modules locally in an expression? For ex= ample module SomeModule =3D struct let x =3D 5 end module SomeOtherModule =3D struct let y =3D 7 end let z =3D open SomeModule and SomeOtherModule in x + y + x*y It can currently be expressed as: let z =3D module XY =3D struct open SomeModule open SomeOtherModule let z =3D x + y + x*y end in XY.z Perhaps it could be considered as a language extension. It seems nice as it "catches the focus". (I'm going to use it with Camlp4 but it seems uglier that way.) I wouldn't buy it for my kidney, though. ;) Best Regards, Lukasz Stafiniak