From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=AWL,RCVD_NUMERIC_HELO, SPF_FAIL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 09153BBC1 for ; Mon, 3 Mar 2008 16:40:38 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJ+qy0fAXQInh2dsb2JhbACQUSEBAQEICimbbQ X-IronPort-AV: E=Sophos;i="4.25,438,1199660400"; d="scan'208";a="8900258" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Mar 2008 16:40:37 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m23FeOmO028189 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 3 Mar 2008 16:40:37 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANuqy0dQW+UCn2dsb2JhbACQUSEBAQEBAQYEBgkIGJtu X-IronPort-AV: E=Sophos;i="4.25,438,1199660400"; d="scan'208";a="23302681" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Mar 2008 16:40:35 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JWCmE-0004mi-8W for caml-list@inria.fr; Mon, 03 Mar 2008 15:40:30 +0000 Received: from 38.96.172.125 ([38.96.172.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Mar 2008 15:40:30 +0000 Received: from sds by 38.96.172.125 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Mar 2008 15:40:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sam Steingold Subject: functor troubles Date: Mon, 03 Mar 2008 10:40:22 -0500 Message-ID: <47CC1BE6.2060408@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.96.172.125 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) X-Enigmail-Version: 0.95.6 Sender: news X-Miltered: at concorde with ID 47CC1BE8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functor:01 hash:01 functor:01 struct:01 sig:01 struct:01 invokes:01 precisely:01 expression:02 defined:02 module:03 module:03 gnu:03 gnu:03 let:03 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It appears that module functor arguments are needlessly duplicated: ============================================ module A1 = struct ~ module F (M: sig end) = struct ~ type t = T ~ end ~ module I = struct end ~ module M = F (I) end module A2 = A1 let f : A1.M.t -> A2.M.t = fun x -> x ============================================ This expression has type A1.M.t = A1.F(A1.I).t but is here used with type A2.M.t = A1.F(A2.I).t when I replace "module M = F (I)" with "module M = F (struct end)" it works. Note that the whole file invokes the functor F precisely once, so it is not clear why type A2.M.t is defined in terms of F and not as identical to A1.M.t. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHzBvmPp1Qsf2qnMcRApMkAJ9OJEfpRk1eKxce3HsZfHapqKKnwQCglT04 ZNXh7XxnQRwz1XjZzTO9wnI= =3TuW -----END PGP SIGNATURE-----