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 A4908BC57 for ; Mon, 26 Apr 2010 18:33:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIBAFdd1UvUTWUIkGdsb2JhbACDFpkmFQEBAQEJCQwHEQQesU2RDYElgnltBA X-IronPort-AV: E=Sophos;i="4.52,274,1270418400"; d="scan'208";a="49215842" Received: from mx4.wp.pl ([212.77.101.8]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Apr 2010 18:33:30 +0200 Received: (wp-smtpd smtp.wp.pl 27863 invoked from network); 26 Apr 2010 18:33:28 +0200 Received: from 18-161.2-0.pl (HELO [192.168.1.101]) (d0@[91.189.18.161]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES256-SHA encrypted SMTP for ; 26 Apr 2010 18:33:28 +0200 Message-ID: <4BD5C057.7020800@wp.pl> Date: Mon, 26 Apr 2010 18:33:27 +0200 From: Dawid Toton User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: caml-list Subject: Re: Module type of a structure returned by functor References: <4BD229E4.4050003@wp.pl> In-Reply-To: <4BD229E4.4050003@wp.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0U00000 [YcNk] X-Spam: no; 0.00; functor:01 foo:01 functor:01 sig:01 val:01 foo:01 functors:01 define:02 modules:02 modules:02 module:03 module:03 let:03 types:05 types:05 I've found that I have more fundamental problem. What is the exact meaning of the following line? module type Foo = functor (X:X) -> sig val foo : X.t end (1) Foo is not a functor, but it is a type of some functors that map modules to modules (2) Foo is a mapping from modules to module types Currently I think that it (1) is true and (2) is false. Let me know if I'm wrong. It means that there is no easy way to get module type of what results from functor application. I think that the solution is to separately define signature of results of the functor and use "with type" clauses to recreate all result module types that are needed. This is not very bad, but I'm still wondering if "module type of..." of 3.12 will provide elegant solution for this. Dawid