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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 0CF7DBC57 for ; Thu, 22 Jul 2010 04:29:26 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuEBAMpJR0xFLmfImWdsb2JhbACfdhUBAQEBAQgLCgcRIsIYhTIEiFk X-IronPort-AV: E=Sophos;i="4.55,240,1278280800"; d="scan'208";a="54595923" Received: from mail.globalsuite.net ([69.46.103.200]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jul 2010 04:29:25 +0200 X-AuditID: c0a8013c-b7b38ae00000735f-95-4c47aeca1b59 Received: from [198.18.80.69] (Unknown_Domain [12.68.54.130]) by mail.globalsuite.net (Symantec Brightmail Gateway) with SMTP id 52.16.29535.ACEA74C4; Wed, 21 Jul 2010 20:36:59 -0600 (MDT) Message-ID: <4C47ACFF.9020409@frisch.fr> Date: Thu, 22 Jul 2010 04:29:19 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Dumitru Potop-Butucaru Cc: caml-list@inria.fr Subject: Re: [Caml-list] Bug in the module system of version 3.12.0+beta1 References: <4C46F866.9050900@inria.fr> <4C473F45.6020307@inria.fr> In-Reply-To: <4C473F45.6020307@inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== X-Spam: no; 0.00; frisch:01 frisch:01 bug:01 runtime:01 recursive:01 ocaml:01 wrote:01 defines:01 caml-list:01 exceptions:01 alain:01 alain:01 expression:02 modules:02 motivation:02 On 7/21/2010 8:41 PM, Dumitru Potop-Butucaru wrote: > If I understand well, what I try to do is impossible for > some deep theoretical reason. Can someone explain this > to me, or point me to a relevant paper explaining it? Turning a module type into a module is not possible in general: if the module type defines runtime components like values, what module would you produce? Then there is a sub-category of module types that can be turned into module in a natural way (module type with only type, class types, module types, exceptions, and recursive or non-recursive modules with the same constraints on their components). By pure coincidence, I played a few months ago with the idea of adding a construction to the language that would turn such a module type into a module expression (I had no concrete motivation to do that). This is available in the module_of_module_type branch of the OCaml svn repository. Alain