From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 9FDE77EF5E for ; Fri, 15 Jul 2016 20:26:25 +0200 (CEST) IronPort-PHdr: 9a23:Hi9paxXcJULQ6f8C4qIGc2m6SvLV8LGtZVwlr6E/grcLSJyIuqrYZhOPt8tkgFKBZ4jH8fUM07OQ6PG4HzBcqs/Y7DgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLHqvcGPKFwR2HKUWvBbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCyE734YGkAfkx5JBQeNyBDhQt+luSL/sq952TKGFczwV7E9Hzq4ufRFUhjt3QcKMTIj8WKfoMt3ieoPoB+nqwZ+wKbIZ5mSNbxmeaTEO9gdQDwSDY5qSyVdD9bkPMM0BO0bMLMd9tGlqg== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=hendrik@topoi.pooq.com; spf=None smtp.mailfrom=hendrik@topoi.pooq.com; spf=None smtp.helo=postmaster@april.topoi.pooq.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=pra; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=mailfrom; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@april.topoi.pooq.com) identity=helo; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="postmaster@april.topoi.pooq.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AwBgBHKolX/4aDpUVchBRLMYJ2qWSOFRqGAAKBaxABAQEBAQEBAWQngjIEARIBghMBBTpPCxgJJQ8FDQsxE4gWAxe7RQ2EGgEBCAIlineCQ4Fag0+CLwEEjgiKZTSMRIINCmeOTogih3k1H4QPIDKFEIFDAQEB X-IPAS-Result: A0AwBgBHKolX/4aDpUVchBRLMYJ2qWSOFRqGAAKBaxABAQEBAQEBAWQngjIEARIBghMBBTpPCxgJJQ8FDQsxE4gWAxe7RQ2EGgEBCAIlineCQ4Fag0+CLwEEjgiKZTSMRIINCmeOTogih3k1H4QPIDKFEIFDAQEB X-IronPort-AV: E=Sophos;i="5.28,369,1464645600"; d="scan'208";a="184937101" Received: from topoi.pooq.com (HELO april.topoi.pooq.com) ([69.165.131.134]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Jul 2016 20:26:22 +0200 Received: by april.topoi.pooq.com (Postfix, from userid 1001) id BB32CC2BC1; Fri, 15 Jul 2016 14:26:15 -0400 (EDT) Date: Fri, 15 Jul 2016 14:26:15 -0400 From: Hendrik Boom To: Ocaml Mailing List Message-ID: <20160715182615.GC379@topoi.pooq.com> References: <001701d1daa2$30f7ac30$92e70490$@metastack.com> <1468179914.25014.89.camel@e130.lan.sumadev.de> <20160714090300.GB21053@frosties> <002601d1de7e$9f5776d0$de066470$@metastack.com> <20160715161308.GB30333@topoi.pooq.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [Caml-list] Warnings opening modules (was: why is building ocaml hard?) On Fri, Jul 15, 2016 at 07:09:22PM +0100, Jeremy Yallop wrote: > On 15 July 2016 at 17:57, Yotam Barnoy wrote: > > In haskell, I can just say 'import A (foo, bar, baz, t)' to limit > > exactly what I want to import. This is because haskell has a > > half-baked module system that isn't nearly as powerful as OCaml's, > > which allows it to create syntax that doesn't need to go anywhere but > > at the toplevel. > > > > We need this functionality in OCaml, but the closest thing is to say > > 'include struct let foo = A.foo let bar = A.bar let baz = A.baz type t > > = A.t end' > > This can be written more succinctly: > > let foo, bar, baz = A.(foo, bar, baz) > type t = A.t And that even allows renaming in case several modules try to define the same name! -- hendrik