From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA02251 for caml-redistribution; Wed, 18 Dec 1996 14:40:41 +0100 (MET) 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 KAA28860 for ; Wed, 18 Dec 1996 10:59:48 +0100 (MET) Received: from firewall.hd.ibm.de (cherub.hd.ibm.de [192.101.197.10]) by nez-perce.inria.fr (8.7.6/8.7.1) with SMTP id KAA29522 for ; Wed, 18 Dec 1996 10:58:22 +0100 (MET) Received: from kaa.heidelbg.ibm.com by firewall.hd.ibm.de (AIX 3.2/UCB 5.64/4.03/chkV1.0) id AA15605; Wed, 18 Dec 1996 10:57:04 +0100 Received: from idse.heidelbg.ibm.com by kaa.heidelbg.ibm.com (AIX 3.2/UCB 5.64/4.03) id AA57207; Tue, 17 Dec 1996 18:49:07 +0100 Received: by idse.heidelbg.ibm.com (AIX 3.2/UCB 5.64/4.03) id AA39644; Tue, 17 Dec 1996 18:49:06 +0100 Message-Id: <9612171749.AA39644@idse.heidelbg.ibm.com> To: caml-list@inria.fr Subject: Re: Piece composition of signatures (& problems derived from them too!) In-Reply-To: (Your message of Tue, 17 Dec 96 12:58:02 PST.) <32B7095A.99A@ing.uc3m.es> Date: Tue, 17 Dec 96 18:49:06 +0100 From: Wolfgang Lux Sender: weis > # module type MIXED = > sig > include ORDER > include TOTAL with type t = t (* THIS IS THE PROBLEM *) > end;; > > module type MIXED = > sig > type t > val <= : t -> t -> bool > type t = t > val compare : t -> t -> int > end > > Characters 31-91: > Signature mismatch: > Modules do not match: > sig > type t = int > val <= : 'a -> 'a -> bool > val compare : int -> int -> int > end > is not included in > MIXED > Type declarations do not match: type t = int is not included in type t = > t > > The problem seems to be that the second "t" hides the first or the type > equation t = int vanishes. I suspect neither of your assumptions is correct. The problem is that your module type MIXED includes two(!) type variables named t (look carefully at the output of the compiler) while your implementation only provides one. Probably the compiler should already flag your definition of MIXED as an error because the name t is defined twice in the environment. (BTW try to enter the expande of the compiler into the compiler and it will happily barf on you :-) Regards Wolfgang ---- Wolfgang Lux WZH Heidelberg, IBM Germany Internet: lux@heidelbg.ibm.com +49-6221-59-4546 VNET: LUX at HEIDELBG +49-6221-59-3500 (fax) EARN: LUX at DHDIBMIP