From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] What does underscore mean in this type expression?
Date: Sat, 30 Aug 2008 14:03:10 +0100 [thread overview]
Message-ID: <20080830130310.GA27910@annexia.org> (raw)
In-Reply-To: <20080830.133831.122629365592826302.Christophe.Troestler+ocaml@umh.ac.be>
On Sat, Aug 30, 2008 at 01:38:31PM +0200, Christophe TROESTLER wrote:
> On Sat, 30 Aug 2008 12:27:18 +0100, Richard Jones wrote:
> >
> > val get_domains :
> > (_[> `R ] as 'a) Connect.t ->
> > is not included in
> > val get_domains :
> > ([> `R ] as 'a) Connect.t ->
> >
> > This syntax doesn't appear to be documented in the manual (unless it's
> > related to '_a). What does it mean?
>
> It is a weak type as you guessed. To convince you of that, here is
> some code:
>
> # let x = ref `X;;
> val x : _[> `X ] ref = {contents = `X}
OK ... so how to get rid of the error? Even supplying a full type for
get_domains in the implementation doesn't get rid of it.
Here's the code if anyone wishes to try:
http://www.annexia.org/tmp/libvirt.mli
http://www.annexia.org/tmp/libvirt.ml
$ ocamlc -c libvirt.mli
$ ocamlc -c libvirt.ml
The implementation libvirt.ml does not match the interface libvirt.cmi:
Values do not match:
[etc]
Rich.
--
Richard Jones
Red Hat
next prev parent reply other threads:[~2008-08-30 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 11:27 Richard Jones
2008-08-30 11:38 ` [Caml-list] " Christophe TROESTLER
2008-08-30 13:03 ` Richard Jones [this message]
2008-08-30 13:57 ` Christophe TROESTLER
2008-08-30 19:29 ` Richard Jones
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=20080830130310.GA27910@annexia.org \
--to=rich@annexia.org \
--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