Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: micha <micha-1@fantasymail.de>
To: "Olivier Andrieu" <oandrieu@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] phantom type thing question
Date: Thu, 1 Mar 2007 17:40:26 +0100	[thread overview]
Message-ID: <20070301174026.5b1c2ba2@localhost> (raw)
In-Reply-To: <95513600703010547t1f098d80p7bbff2f2c85d79a5@mail.gmail.com>

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 


  parent reply	other threads:[~2007-03-01 16:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01  9:46 micha
     [not found] ` <95513600703010547t1f098d80p7bbff2f2c85d79a5@mail.gmail.com>
2007-03-01 13:49   ` [Caml-list] " Olivier Andrieu
2007-03-01 16:40   ` micha [this message]
2007-03-01 17:03     ` Olivier Andrieu
2007-03-01 20:01       ` micha

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=20070301174026.5b1c2ba2@localhost \
    --to=micha-1@fantasymail.de \
    --cc=caml-list@inria.fr \
    --cc=oandrieu@gmail.com \
    /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