From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7M8ZgBR027861 for ; Mon, 22 Aug 2011 10:35:42 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnIEAK8TUk5KfVK2kGdsb2JhbABBhEuUKYNdizoIFAEBAQEJCQ0HFAQhgVkCDx0BNwEBAw0FJhYLAgsDAgECASIBBQEWGQEHAQEeh1ECmCEKi3mDFYQYiSgCAwaFMoEQBI4PhQWFDIEohiU8gUCCIw X-IronPort-AV: E=Sophos;i="4.68,262,1312149600"; d="vcf'?scan'208";a="106011218" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 22 Aug 2011 10:35:39 +0200 Received: by wyh15 with SMTP id 15so5994227wyh.27 for ; Mon, 22 Aug 2011 01:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :x-enigmail-version:content-type; bh=44AFVQEGcSbIapCP+b/56MmJsH1gKbLKgU+E5tAf6Dk=; b=w5dZyoMZ1uMEs44yvRZ+wspyiOgXIN0oDPr4ebloMwHV/MGOLyBMyw6Fdi9x73tuY+ B3hcRgVfPkrAfVAig+Vdv5XjNQIOt+OVcgehW+wYR9K5w47PBYl7WOMTTwd+wCU5XbL2 Y38TuGH3in62z5T1fqCXGUKoQhvC7YchsffL0= Received: by 10.216.158.201 with SMTP id q51mr1800509wek.47.1314002139151; Mon, 22 Aug 2011 01:35:39 -0700 (PDT) Received: from [193.55.250.205] (chercheurs2-205.saclay.inria.fr [193.55.250.205]) by mx.google.com with ESMTPS id z49sm3775401wec.26.2011.08.22.01.35.37 (version=SSLv3 cipher=OTHER); Mon, 22 Aug 2011 01:35:38 -0700 (PDT) Sender: Fabrice Le Fessant Message-ID: <4E5214D9.1060400@inria.fr> Date: Mon, 22 Aug 2011 10:35:37 +0200 From: Fabrice Le Fessant User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: caml-list@inria.fr CC: Thomas Gazagnaire X-Enigmail-Version: 1.1.2 Content-Type: multipart/mixed; boundary="------------030901010201020800000903" X-Validation-by: fabrice.le_fessant@inria.fr Subject: [Caml-list] packing modules as a functor This is a multi-part message in MIME format. --------------030901010201020800000903 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, We have recently worked on the OCaml compiler to allow packing compilation units inside a functor. This work extends the current -pack option with a new -pack-functor option, that will generate a compilation unit, containing a functor composed of independent compilation units (compiled with a new -functor option). As we are looking for feedback on the utility of this feature, we have written a small page to release the patch and describe how to use it: http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html There are also two additional features in the patch: (1) you can use -i on interface files (.cmi) instead of only sources, and (2) you can use -pack to generate an interface file (.cmi) from other interface files. The page has also a link to "ocp-pack", a simple program to pack sources instead of compilation units, to achieve the same result as the -pack and -pack-functor options. Note that, if you have recursive dependencies between compilation units (usually achieved by hidden dependencies between abstract types), you will need a patched OCaml to be able to compile the new source (the patch is also provided). Enjoy and send us some feedback ! Fabrice -- Scientific Advisor for OCamlPro SAS --------------030901010201020800000903 Content-Type: text/x-vcard; charset=utf-8; name="fabrice_le_fessant.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fabrice_le_fessant.vcf" begin:vcard fn:Fabrice LE FESSANT n:LE FESSANT;Fabrice org:INRIA Saclay -- Ile-de-France;P2P & OCaml adr;quoted-printable:;;Parc Orsay Universit=C3=A9 ;Orsay CEDEX;;91893;France email;internet:fabrice.le_fessant@inria.fr title;quoted-printable:Charg=C3=A9 de Recherche tel;work:+33 1 74 85 42 14 tel;fax:+33 1 74 85 42 49 url:http://fabrice.lefessant.net/ version:2.1 end:vcard --------------030901010201020800000903--