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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 846F2BC57 for ; Mon, 26 Apr 2010 18:48:08 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvACANtg1UtKfVI0mGdsb2JhbACSC4opCBUBAQEBAQgJDAcRIrIqgXiFYC6ITgEBAwWFBgQ X-IronPort-AV: E=Sophos;i="4.52,274,1270418400"; d="scan'208";a="61420180" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail4-smtp-sop.national.inria.fr with ESMTP; 26 Apr 2010 18:48:08 +0200 Received: by wwb29 with SMTP id 29so305928wwb.39 for ; Mon, 26 Apr 2010 09:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=y5RtHhpv1zoUDMiactfY5EUcL4T1LK7AzmYMLalf33s=; b=PNp0jikhl/JcbBP/ZBW2wvlPbmUPZLIkWZ0D8BqrMzq77/1G4CJDGaCDxzXZ59WBvo VWy8ZpueeNClnxWi0hqAZhntYFWMxrQZfhc5j1rAKJgjwie8/BHSB7mmK50zq8MsTPT9 2Vh7NgIajGVQEGX2mpk1WLuLIAhC1VQlnXCcg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=phZj1t6gkD36WXsNqsi3pBX0oAFo6NjcpAozifDbe8N6Nn7uTv5146O4wAPd9eNrp2 qzynrzHNQbXYiCXXlKDKTcIt8OFLvApVffzHws76Ai2Jl8FBHc4y8Mi5+QvmrTiN2+2G LMyvk+jWMaxOPPCRry7AA3TftDypZcqmqbYk0= Received: by 10.216.87.74 with SMTP id x52mr5970004wee.4.1272300487608; Mon, 26 Apr 2010 09:48:07 -0700 (PDT) Received: from [192.168.0.11] (tui75-1-81-57-73-233.fbx.proxad.net [81.57.73.233]) by mx.google.com with ESMTPS id t27sm845041wbc.11.2010.04.26.09.48.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 09:48:06 -0700 (PDT) Cc: caml-list Message-Id: <84448358-089B-4505-A814-FC4C2EC5BB08@gmail.com> From: Vincent Aravantinos To: Dawid Toton In-Reply-To: <4BD5C057.7020800@wp.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Caml-list] Re: Module type of a structure returned by functor Date: Mon, 26 Apr 2010 18:48:05 +0200 References: <4BD229E4.4050003@wp.pl> <4BD5C057.7020800@wp.pl> X-Mailer: Apple Mail (2.936) X-Spam: no; 0.00; functor:01 foo:01 functor:01 sig:01 val:01 foo:01 functors:01 caml-list:01 define:02 modules:02 modules:02 inferred:02 btw:03 module:03 module:03 Hi, Le 26 avr. 10 =E0 18:33, Dawid Toton a =E9crit : > I've found that I have more fundamental problem. What is the exact =20 > meaning of the following line? > > module type Foo =3D 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 =20= > 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 =20= > if I'm wrong. You're right. > It means that there is no easy way to get module type of what =20 > results from functor application. I think that the solution is to =20 > separately define signature of results of the functor and use "with =20= > type" clauses to recreate all result module types that are needed. That's exactly the way to go (BTW is it such a pain? maybe your "with =20= type" is easily inferred but not easily written?) > This is not very bad, but I'm still wondering if "module type of..." =20= > of 3.12 will provide elegant solution for this. I can't remember this point... V.=