[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-03-01 (16:36) |
From: | micha <micha-1@f...> |
Subject: | Re: [Caml-list] phantom type thing question |
Am Thu, 1 Mar 2007 14:47:47 +0100 schrieb "Olivier Andrieu" <oandrieu@gmail.com>: > On 3/1/07, micha <micha-1@fantasymail.de> 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