From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A2FA1BB84 for ; Sat, 30 Aug 2008 15:03:12 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEACDiuEjAXQIm/2dsb2JhbAC1UIFp X-IronPort-AV: E=Sophos;i="4.32,297,1217800800"; d="scan'208";a="16623493" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Aug 2008 15:03:12 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m7UD3Bis027374 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 30 Aug 2008 15:03:12 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoICAOXhuEhQRFuwiGdsb2JhbACSRgEBAQ8goleBaQ X-IronPort-AV: E=Sophos;i="4.32,297,1217800800"; d="scan'208";a="28643325" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 30 Aug 2008 15:03:11 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1KZQ6g-0007Im-Te for caml-list@inria.fr; Sat, 30 Aug 2008 14:03:10 +0100 Date: Sat, 30 Aug 2008 14:03:10 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] What does underscore mean in this type expression? Message-ID: <20080830130310.GA27910@annexia.org> References: <20080830112718.GA25303@annexia.org> <20080830.133831.122629365592826302.Christophe.Troestler+ocaml@umh.ac.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080830.133831.122629365592826302.Christophe.Troestler+ocaml@umh.ac.be> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Miltered: at discorde with ID 48B9450F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 christophe:01 troestler:01 0100,:01 val:01 val:01 syntax:01 mli:01 ocamlc:01 mli:01 ocamlc:01 cmi:01 wrote:01 wrote:01 caml-list:01 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