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 455AF7EFCD for ; Thu, 30 Oct 2014 17:07:16 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lpw25@cam.ac.uk) identity=pra; client-ip=131.111.8.150; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lpw25@cam.ac.uk"; x-sender="lpw25@cam.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lpw25@cam.ac.uk) identity=mailfrom; client-ip=131.111.8.150; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lpw25@cam.ac.uk"; x-sender="lpw25@cam.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@ppsw-50.csi.cam.ac.uk) identity=helo; client-ip=131.111.8.150; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lpw25@cam.ac.uk"; x-sender="postmaster@ppsw-50.csi.cam.ac.uk"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArECAENhUlSDbwiWnGdsb2JhbABcvg8Gm04CgSQWAQEBAQERAQEBAQEICwkJFC6EAwEBAwF5BQsLISUPAQRJiEsJBMQrhAsBCgEBAR4Yhh6KWgeESwWfG5EGhjyBRIM3AQEB X-IPAS-Result: ArECAENhUlSDbwiWnGdsb2JhbABcvg8Gm04CgSQWAQEBAQERAQEBAQEICwkJFC6EAwEBAwF5BQsLISUPAQRJiEsJBMQrhAsBCgEBAR4Yhh6KWgeESwWfG5EGhjyBRIM3AQEB X-IronPort-AV: E=Sophos;i="5.07,286,1413237600"; d="scan'208";a="85447802" Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Oct 2014 17:07:15 +0100 X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from host86-181-34-203.range86-181.btcentralplus.com ([86.181.34.203]:51906 helo=netbook) by ppsw-50.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.158]:587) with esmtpsa (PLAIN:lpw25) (TLSv1.2:AES128-GCM-SHA256:128) id 1XjsFn-0002ow-qa (Exim 4.82_3-c0e5623) (return-path ); Thu, 30 Oct 2014 16:07:15 +0000 From: Leo White To: Philippe Veber Cc: caml users References: <86y4rxfuus.fsf@cam.ac.uk> X-Face: "XWxb[u_Z\PA_Y?9@|IA!!+jTb(/290-*ea/Un$I0B98.$n%eL.;2w*,z]WR#T:,p[ NBd++M7l]#7zj7!{~iw $W-"/=|dVjhT[D{4~gE}gK<2`.6fs!;uqqud]vs2N/3^m7{aS1V, Date: Thu, 30 Oct 2014 16:07:13 +0000 In-Reply-To: (Philippe Veber's message of "Thu, 30 Oct 2014 17:00:19 +0100") Message-ID: <86egtp7d8u.fsf@cam.ac.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Typing of a parameterized class where the type parameter is the type of self. > This was an easy way to say that the polymorphism of m was not captured by 'a. I don't want to abuse your time, but if > you have a tiny example illustrating when this automatic promotion is indeed useful, I'd be curious to see it. In any > case, many thanks for the fix, which I'll use right away. I think that the automatic promotion is just for convenience to avoid writing "'a . ..." on lots of methods. Your example should probably be considered a bug since the promotion should really only happen when the method type is genuinely polymorphic, but I don't know how easy it is to fix. Regards, Leo