From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 9197DBB81 for ; Sat, 20 Nov 2004 15:45:50 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iAKEjoTk030413 for ; Sat, 20 Nov 2004 15:45:50 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA15593 for ; Sat, 20 Nov 2004 15:45:49 +0100 (MET) Received: from smtp06.web.de (smtp06.web.de [217.72.192.224]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iAKEjnEL030408 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 20 Nov 2004 15:45:49 +0100 Received: from [80.131.122.61] (helo=wiko) by smtp06.web.de with smtp (WEB.DE 4.102 #165) id 1CVWUl-0006jd-00; Sat, 20 Nov 2004 15:45:47 +0100 Message-ID: <002601c4cf0f$f27ace10$14b2a8c0@wiko> From: "Andreas Rossberg" To: "John F. Hughes" , References: <20041120041446.JDEC13256.lakermmtao10.cox.net@SPIKESHOMEPC> Subject: Re: [Caml-list] A second functor question Date: Sat, 20 Nov 2004 15:48:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Sender: AndreasRossberg@web.de X-Sender: AndreasRossberg@web.de X-Miltered: at nez-perce with ID 419F589E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 419F589D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; rossberg:01 caml-list:01 functor:01 wrote:01 sig:01 functor:01 struct:01 foo:01 foo:01 sig:01 ...:98 define:01 andreas:01 andreas:01 module:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: John F. Hughes wrote: > > module type COMBINE = > sig > module A : P > module B : P > end;; > with A.t = B.t;; > > [...] > > module Fun = > functor (Z : COMBINE) -> > struct > let f x:Z.A.t = Z.B.foo x > end;; > > This will fail because Z.B.foo expects a B.t, but is being handed an > A.t. It works when you define COMBINE as module type COMBINE = sig module A : P module B : P with type t = A.t end Hope this helps, - Andreas