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=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 61D44BC0A for ; Thu, 1 Mar 2007 17:36:48 +0100 (CET) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l21GalDU016765 for ; Thu, 1 Mar 2007 17:36:48 +0100 Received: (qmail invoked by alias); 01 Mar 2007 16:36:47 -0000 X-Provags-ID: V01U2FsdGVkX19NmNcqyrZNxOiIw+58VqI2v/HcrdesbMbJTRBMv7 j6GepexIM9kaRD Date: Thu, 1 Mar 2007 17:40:26 +0100 From: micha To: "Olivier Andrieu" , caml-list@inria.fr Subject: Re: [Caml-list] phantom type thing question Message-ID: <20070301174026.5b1c2ba2@localhost> In-Reply-To: <95513600703010547t1f098d80p7bbff2f2c85d79a5@mail.gmail.com> References: <45E6A0E6.80502@fantasymail.de> <95513600703010547t1f098d80p7bbff2f2c85d79a5@mail.gmail.com> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Miltered: at concorde with ID 45E7011F.004 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 subtyping:01 annotation:01 subtyping:01 -'a:01 -'a:01 val:01 wrote:01 abstract:01 caml-list:01 int:01 width:97 parameter:02 parameter:02 Am Thu, 1 Mar 2007 14:47:47 +0100 schrieb "Olivier Andrieu" : > On 3/1/07, micha wrote: > > > if you want subtyping, you'll need to add a variance annotation to > your type parameter. Otherwise since your type sym is abstract, you'll > get no subtyping at all. In this case you probably want a > contravariant type parameter: > > type -'a sym o.k., but after reading section 6.8.1 of the manual I don't see why it needs to be -'a and not +'a > that should be: > val get_image_width : [> xpm] sym -> int thanks, that helped, Michael