caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin DeMello <martindemello@gmail.com>
To: OCaml List <caml-list@yquem.inria.fr>
Subject: [Caml-list] "this ground coercion is not principal"
Date: Tue, 24 Feb 2015 20:47:04 -0800	[thread overview]
Message-ID: <CAFrFfuGbo8nX5Nh_3F0vJagQ-p8WEPjmMCy-6-mZfhw1oE5RdA@mail.gmail.com> (raw)

What does this warning mean? I got it while compiling some code off
github [https://github.com/JoeDralliam/OcsfmlExamples/blob/master/Examples/sockets.ml]
and by experimenting it seems to be related to this bit from the
manual

Note that the coercion ( expr :>  typexpr ) is actually an abbreviated
form, and will only work in presence of private abbreviations if
neither the type of expr nor typexpr contain any type variables. If
they do, you must use the full form ( expr :  typexpr1 :>  typexpr2 )
where typexpr1 is the expected type of expr. Concretely, this would be
(x : N.t :> int) and (l : N.t list :> int list) for the above
examples.

but I could not find anything on google for either "ground coercion"
or "principal type coercion" that would explain what it was actually
saying. Could someone please point me to a reference?

martin

             reply	other threads:[~2015-02-25  4:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25  4:47 Martin DeMello [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2013-01-10 20:15 [Caml-list] This ground coercion is not principal? bob zhang
2013-01-10 21:06 ` Jeremie Dimino
2013-01-10 21:12   ` bob zhang

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=CAFrFfuGbo8nX5Nh_3F0vJagQ-p8WEPjmMCy-6-mZfhw1oE5RdA@mail.gmail.com \
    --to=martindemello@gmail.com \
    --cc=caml-list@yquem.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).