From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 8964F7ED34 for ; Thu, 5 Jul 2012 00:54:10 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jean-louis.giavitto@ircam.fr) identity=pra; client-ip=129.102.3.71; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="Jean-Louis.Giavitto@ircam.fr"; x-sender="jean-louis.giavitto@ircam.fr"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of Jean-Louis.Giavitto@ircam.fr designates 129.102.3.71 as permitted sender) identity=mailfrom; client-ip=129.102.3.71; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="Jean-Louis.Giavitto@ircam.fr"; x-sender="Jean-Louis.Giavitto@ircam.fr"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smarthost1.ircam.fr) identity=helo; client-ip=129.102.3.71; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="Jean-Louis.Giavitto@ircam.fr"; x-sender="postmaster@smarthost1.ircam.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcCAHzI9E+BZgNHgWdsb2JhbABFhV+xTyIBARYmJ4JCFUA2AgUWCwILAwIBAgFYCAEBiAcBA5hChk6Hc5J/gSCNO4IKgRIDlTeBEoREjQ4 X-IronPort-AV: E=Sophos;i="4.77,526,1336341600"; d="scan'208";a="165634403" Received: from smarthost1.ircam.fr ([129.102.3.71]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Jul 2012 00:54:10 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by smarthost1.ircam.fr (Postfix) with ESMTP id AE8D59430D; Thu, 5 Jul 2012 00:54:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at ircam.fr Received: from smarthost1.ircam.fr ([127.0.0.1]) by localhost (smarthost1.ircam.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y0WcJy4vw0t3; Thu, 5 Jul 2012 00:54:09 +0200 (CEST) Received: from increvable.ircam.fr (increvable.ircam.fr [IPv6:2001:660:3004:2:230:48ff:fe29:4f48]) by smarthost1.ircam.fr (Postfix) with ESMTP id 8CFD694308; Thu, 5 Jul 2012 00:54:09 +0200 (CEST) Received: from [192.168.1.10] (29.127.19.93.rev.sfr.net [93.19.127.29]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: giavitto) by increvable.ircam.fr (Postfix) with ESMTP id 69C3C4E381; Thu, 5 Jul 2012 00:54:09 +0200 (CEST) Message-ID: <4FF4C98F.2030703@ircam.fr> Date: Thu, 05 Jul 2012 00:54:07 +0200 From: Jean-Louis Giavitto Reply-To: jean-louis.giavitto@ircam.fr Organization: UMR STMS 9912 - IRCAM & CNRS User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Validation-by: jean-louis.giavitto@ircam.fr Subject: [Caml-list] In 3.12 and 4.0, erratic message "The implementation tt.ml does not match the interface tt.cmi" Hello. if anyone could give me some hints on the following problem... I have a file tt.ml which reduces to type typedef = { isa : 'a 'rep 'cell . (('rep, int, int, int, int, int) #Collection.collection as 'a); } The mli file is exactly the same has the ml file. 'collection' is a virtual class declared in file collection.ml and signature in collection.mli. tt.ml compile without problems. However, if I replace (in tt.ml and tt.mli) one of the 'int' parameter by a type variable: type typedef = { isa : 'a 'rep 'cell . (('rep, 'cell, int, int, int, int) #Collection.collection as 'a); } then I have the following message (with the 4.0 compiler): File "tt.ml", line 1: Error: The implementation tt.ml does not match the interface tt.cmi: Type declarations do not match: type typedef = { isa : 'a 'rep 'cell. ('rep, 'cell, int, int, int, int) #Collection.collection as 'a; } is not included in type typedef = { isa : 'a 'rep 'cell. ('rep, 'cell, int, int, int, int) #Collection.collection as 'a; } File "tt.ml", line 2, characters 5-112: Actual declaration The types for field isa are not equal. - The problem appears with the compiler 3.12 but also 4.0 (a similar error (5622) was reported but was not reproducible with 4.0). - I have no problem if I drop the .mli file. - The error seems sensitive to the definition of the class 'collection': I was not able to reproduce it with a much simpler definition of collection. - I have the same error if I replace more 'int' parameter by type variables. Have you any clues? Jean-Louis Giavitto.