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

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

  reply	other threads:[~2013-01-10 21:06 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 [this message]
2013-01-10 21:12   ` bob zhang
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=20130110160637.76f34956@nyc-qws-033.delacy.com \
    --to=jeremie@dimino.org \
    --cc=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    /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).