From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 5CA827EEBF for ; Sun, 28 Jun 2015 11:44:59 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=pra; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=mailfrom; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mailhost.math.nagoya-u.ac.jp) identity=helo; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="postmaster@mailhost.math.nagoya-u.ac.jp"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AEAQC5wY9VlwWCBoVBGoNlX78RCoV4AoFoAQEBAQEBEgEBAQEBCBYHT4QjAQEEIwQZAwE1AQEOCxgCAhgOAgJXBgESiC4OOrcfcIRqAotkhSwBAQEBAQEBAwEBAQEBAQEBAQERAQaBIYophFMzB4ItDC8SHYEUjBdthwWEWYZ8gXyPHYcihC9gAYJHAQEB X-IPAS-Result: A0AEAQC5wY9VlwWCBoVBGoNlX78RCoV4AoFoAQEBAQEBEgEBAQEBCBYHT4QjAQEEIwQZAwE1AQEOCxgCAhgOAgJXBgESiC4OOrcfcIRqAotkhSwBAQEBAQEBAwEBAQEBAQEBAQERAQaBIYophFMzB4ItDC8SHYEUjBdthwWEWYZ8gXyPHYcihC9gAYJHAQEB X-IronPort-AV: E=Sophos;i="5.13,693,1427752800"; d="scan'208";a="138139632" Received: from rabbit.math.nagoya-u.ac.jp (HELO mailhost.math.nagoya-u.ac.jp) ([133.6.130.5]) by mail3-smtp-sop.national.inria.fr with ESMTP; 28 Jun 2015 11:44:56 +0200 Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 0C4A66440; Sun, 28 Jun 2015 18:44:52 +0900 (JST) Received: from mailhost.math.nagoya-u.ac.jp (rabbit-172 [172.16.254.254]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 851042518; Sun, 28 Jun 2015 18:44:52 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=math.nagoya-u.ac.jp; h= subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=alpha; bh=MADk2+PJSdAmb6/5/OYFYV5D9pQ=; b=jLnUvl68sQw2VRfMhBIu+c7Snj/+ KVjfxqxYks4yekTTbUnm43Wf7P7khCE2FFXoEkZb+qt4oZY9KoNh1g52+BGS54vD gdHMrQVvuIfQu/JSxzN7NdBdBv5OGUxM9t0x4P68SeKc/SvLAaJlbxW7Wfxk0ItM gvsmrP4C81W0Z9o= DomainKey-Signature: a=rsa-sha1; h=Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=0z5dFyuvbOT2vZWrCLoCHradNCiGXhL+a0fnJg/DlBHa1FtJU/a4ntwmXDUe25QeKHFkkwkojvbgz1r9ZmyEqPBrCgp/b4+2ndlzbKNL4YCWlZdQvsc8Udva4sbnG/tzLlkiX2LemUqb4skZwR/CY3yrbNJC2smWahx+rXD9id4=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha Received: from tet.garrigue.jp (58x158x128x157.ap58.ftth.ucom.ne.jp [58.158.128.157]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTPSA id 599036C33; Sun, 28 Jun 2015 18:43:49 +0900 (JST) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: text/plain; charset=utf-8 From: Jacques Garrigue In-Reply-To: Date: Sun, 28 Jun 2015 18:44:51 +0900 Cc: OCaML List Mailing Content-Transfer-Encoding: quoted-printable Message-Id: References: <558D94EB.3020902@glondu.net> To: =?utf-8?Q?St=C3=A9phane_Glondu?= , Jeremy Yallop X-Mailer: Apple Mail (2.2098) Subject: Re: [Caml-list] Change in typing between OCaml 4.01.0 and 4.02.2... On 2015/06/27 04:15, Jeremy Yallop wrote: >=20 > On 26 June 2015 at 19:07, St=C3=A9phane Glondu wrote: >> $ cat query.mli >> val make : #App.t -> unit >=20 >> $ cat app.ml > [...] >> Query.make self; > [...] >> With OCaml 4.02.2, I get the following error message: >>=20 >> File "app.ml", line 15, characters 6-12: >> Error: This expression has type App.status >> It has no method pop >>=20 >> which looks wrong. With OCaml 4.01.0, there is no error. >>=20 >> Does anyone understand what is going on? >=20 > I think this is a result of tighter checks against self-references > when compiling modules: >=20 > http://caml.inria.fr/mantis/view.php?id=3D6886 Indeed, this seems to be the direct cause. Note that the behavior of referring to oneself through an external name was never properly defined (most often it would already fail and even when succeeding it was referring to another definition). The correct way to do this is either to duplicate the definition of status in both app and query (removing the cyclic dependency), or to define it in another file, which can be correctly referred to by both. Yet, we should probably try to improve the error message, which is indeed confusing. Not so easy, because this kind of self-reference can be detected at very unexpected timings. Can you add a comment to the above bug report? Jacques Garrigue=