From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 723B77FBBC for ; Wed, 7 Jan 2015 16:15:40 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of goswin-v-b@web.de designates 212.227.17.12 as permitted sender) identity=mailfrom; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlUAANZMrVTU4xEMnGdsb2JhbABcg1hYxi6FewKBD0MBAQEBAREBAQEBAQYNCQkULoQNAQU6TwsYCSUPBSiISwEUBL8UH4N/AQsBH49/FoMAgRMFkXGFPIE/hEIMi1iEEW6CQwEBAQ X-IPAS-Result: AlUAANZMrVTU4xEMnGdsb2JhbABcg1hYxi6FewKBD0MBAQEBAREBAQEBAQYNCQkULoQNAQU6TwsYCSUPBSiISwEUBL8UH4N/AQsBH49/FoMAgRMFkXGFPIE/hEIMi1iEEW6CQwEBAQ X-IronPort-AV: E=Sophos;i="5.07,715,1413237600"; d="scan'208";a="116050094" Received: from mout.web.de ([212.227.17.12]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Jan 2015 16:15:40 +0100 Received: from frosties.localnet ([134.3.241.185]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MYNrh-1YLmWJ3PCz-00V7yk for ; Wed, 07 Jan 2015 16:15:38 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.82) (envelope-from ) id 1Y8sKf-00059K-Un for caml-list@inria.fr; Wed, 07 Jan 2015 16:15:38 +0100 Date: Wed, 7 Jan 2015 16:15:37 +0100 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20150107151537.GC17784@frosties> References: <87d273ljxp.fsf@study.localdomain> <996F18A3-E87B-4723-A355-25A09AF4527B@gmail.com> <874msflb48.fsf@study.localdomain> <87tx0fjoql.fsf@study.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tx0fjoql.fsf@study.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:ynttCJhbMZPPqOlN4cYyXtK5Yqb++L1LW/736y49dZWFHYquHfI K/k54jP6rSoUHV372xKqpXlr1UONsqUfcc1Sbu8LTq/VHMIUm0gwBSv7ffVEAXwoGzwtzRL 3/gWwqt9agAK4oxCY4cVl0L24n81u27KfKQAofU/wfvh1ck9aaHiu6QQB+JRVHsFEvIjgiT B0+2c1mjUUoXzbk2agmBg== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] Module aliases ideal name-spacing On Mon, Dec 29, 2014 at 12:14:58AM +0000, Leo White wrote: > > The only remaining remnant of the "prefixed" > > namespace is in myLib.mli/.ml > > > > > > module MyModule = MyLibMyModule > > module Utils = MyLibUtils > > > > It would be nice to eliminate that as well, but I could imagine > > auto-generating these module alias mappings. > > It is certainly feasible to have the build system generate these > mappings automatically. For example, I believe that Jane Street's > example build rules for Jenga include support for generating these alias > mappings (examples/js-build-style/jengaroot.ml in the Jenga source > code). > > > This > > sounds like a nice workaround the namespace issue, but do you think it would be worth supporting module aliases > > themselves as a form of namespacing at compilation time, so that this intermediate prefixed compilation artifact isn't > > needed? > > I'm aware of a few proposals, and I'm sure something more user-friendly > will happen at some point, but the details of these proposals are tricky > and important to get right. For now, the support in 4.02 is at least > sufficient to have a working replacement for `-pack`. > > Regards, > > Leo Isn't this just an improvement on pack to reduce code size? As in sources that only use MyLib.Util will only get MyLibUtil linked in but not MyLibMyModule. >From a user standpoint a MyLib pack or the MyLib aliases should be the same. So maybe the build system could use pack for old ocaml and alias for new ocaml. Packs would work as is and for aliases the build system would generate the myLib.ml(i) automatically. Should be fairly easy to do in _oasis, I hope. MfG Goswin