From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 AFCAE7F1DD for ; Thu, 10 Jan 2013 22:12:27 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.223.176; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.223.176 as permitted sender) identity=mailfrom; client-ip=209.85.223.176; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; 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@mail-ie0-f176.google.com) identity=helo; client-ip=209.85.223.176; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-ie0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlQCAFYu71DRVd+wlGdsb2JhbABEvWYIFg4BAQEBCQkUEimCHgEBBAFAARsdAQMBCwYFBAEGDS4hAQERAQUBHAYTG4drAQMJBpkfjDOCe4RnChknDVmFawEFDItmhS0DiGCLVIFWizeDMRYphDU X-IronPort-AV: E=Sophos;i="4.84,446,1355094000"; d="scan'208";a="189351236" Received: from mail-ie0-f176.google.com ([209.85.223.176]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Jan 2013 22:12:10 +0100 Received: by mail-ie0-f176.google.com with SMTP id 13so1428945iea.7 for ; Thu, 10 Jan 2013 13:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=j6FTMMbJYP0xctqr6BFwaHEf38FpdP22rRY3FMiR7F8=; b=jWMdZ9ZQdnzIz/eQXhYtT2m6wbHkOxRYOPig6+IPeygnK5PtJOnJ8CExqZab6hC9Ss QRPxw0J95QBvAmYROWKJ5wAczc3Vmd+h5JJbB/KzIx/tukWUUmt+okmrHd6X2o6/Lmi0 Ac+6aDYLsquMvR/HkoL9zEXuvlNkVwEN7I1u48kirIoK4F28MlQMcpIR/L/GUcaWiPG9 joraMvFF3kViNhWN6Arj+RDuL53m7iqCrDyi3yiZwPJxJVdcVxqrgbVepjivdLIdHgLT xkaXT5ERrqfkVrm95AEl2n8dCpnUAUFJOOE8UWr9P4lgI8BYLINNkciD4wUnmZZYqvLi s+ZA== MIME-Version: 1.0 Received: by 10.50.7.234 with SMTP id m10mr7135232iga.43.1357852328715; Thu, 10 Jan 2013 13:12:08 -0800 (PST) Received: by 10.64.17.4 with HTTP; Thu, 10 Jan 2013 13:12:08 -0800 (PST) In-Reply-To: <20130110160637.76f34956@nyc-qws-033.delacy.com> References: <20130110160637.76f34956@nyc-qws-033.delacy.com> Date: Thu, 10 Jan 2013 16:12:08 -0500 Message-ID: From: bob zhang To: Jeremie Dimino Cc: Caml List Content-Type: multipart/alternative; boundary=f46d04462dd4b5e50d04d2f5a17a Subject: Re: [Caml-list] This ground coercion is not principal? --f46d04462dd4b5e50d04d2f5a17a Content-Type: text/plain; charset=ISO-8859-1 Yes, it works, thanks. :-) Actually I tried ((self#ant a0 : ant) :> _ mlist) before, the parens matter here On Thu, Jan 10, 2013 at 4:06 PM, Jeremie Dimino wrote: > On Thu, 10 Jan 2013 15:15:31 -0500 > bob zhang wrote: > > > Hi List, > > I have came across a corner case in ocaml typing here, > > The source code is pasted below(extracted from a large code base), it > > triggers the warning 18. > > My question, is there any elegant solution without introducing local > > types? > > You can use an explicit coercion: (self#ant a0 : ant :> _ mlist) > > Cheers, > Jeremie > -- Regards -- Bob --f46d04462dd4b5e50d04d2f5a17a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes, it works, thanks. :-)
Actually I tried=A0
((self#ant a0 = : ant) :> _ mlist) before, the parens matter here=A0

On Thu, Jan 10, 2013 at 4:06 PM, Jeremie Dimino <jeremi= e@dimino.org> wrote:
On Thu, 10 Jan 2013 15:15:= 31 -0500
bob zhang <bobzhang1988@gmail.= com> wrote:

> Hi List,
> =A0 I have came across a corner case in ocaml typing here,
> The source code is pasted below(extracted from a large code base), it<= br> > triggers the warning 18.
> My question, is there any elegant solution without introducing local > types?

You can use an explicit coercion: (self#ant a0 : ant :> _ mlist)
Cheers,
Jeremie



--
Regards=
-- Bob
--f46d04462dd4b5e50d04d2f5a17a--