caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: bob zhang <bobzhang1988@gmail.com>
To: Jeremie Dimino <jeremie@dimino.org>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] This ground coercion is not principal?
Date: Thu, 10 Jan 2013 16:12:08 -0500	[thread overview]
Message-ID: <CANcqPu5u13d=t_z7ObJAP2CHFSM2mvcT4GmehANGDSv5dcX_+g@mail.gmail.com> (raw)
In-Reply-To: <20130110160637.76f34956@nyc-qws-033.delacy.com>

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

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 <jeremie@dimino.org> wrote:

> On Thu, 10 Jan 2013 15:15:31 -0500
> bob zhang <bobzhang1988@gmail.com> 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

[-- Attachment #2: Type: text/html, Size: 1095 bytes --]

  reply	other threads:[~2013-01-10 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 20:15 bob zhang
2013-01-10 21:06 ` Jeremie Dimino
2013-01-10 21:12   ` bob zhang [this message]
2015-02-25  4:47 [Caml-list] "this ground coercion is not principal" Martin DeMello
2015-02-25  9:29 ` Jeremie Dimino
2015-02-25 10:38 ` Jeremy Yallop
2015-02-25 21:35   ` Martin DeMello
2015-02-25 23:04     ` Jeremy Yallop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANcqPu5u13d=t_z7ObJAP2CHFSM2mvcT4GmehANGDSv5dcX_+g@mail.gmail.com' \
    --to=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jeremie@dimino.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).