From: Christophe Papazian <christophe.papazian@gmail.com>
To: caml-list@inria.fr
Subject: covariance newb question
Date: Tue, 22 Nov 2005 12:37:46 +0100 [thread overview]
Message-ID: <5FABF242-1101-4499-8CF5-CF1559F6EECC@essi.fr> (raw)
# type +'a t = 'a -> 'a;;
In this definition, expected parameter variances are not satisfied.
The 1st type parameter was expected to be covariant, but it is invariant
But type t seems to be covariant :
# let f : 'a t = (fun x -> x);;
val f : 'a t = <fun>
# let g : int t = f;;
val g : int t = <fun>
Is there something wrong in my thought ?
thank you,
Christophe Papazian
next reply other threads:[~2005-11-22 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-22 11:37 Christophe Papazian [this message]
2005-11-23 12:16 ` [Caml-list] " Keiko Nakata
2005-11-27 23:31 ` Christophe Raffalli
2005-11-28 7:09 ` Olivier Andrieu
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=5FABF242-1101-4499-8CF5-CF1559F6EECC@essi.fr \
--to=christophe.papazian@gmail.com \
--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