From: "François Pottier" <francois.pottier@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Another question on subsumption of polymorphic variants
Date: Fri, 13 Nov 2020 14:07:36 +0100 [thread overview]
Message-ID: <ad95e76b-8dfc-5ba0-0f26-7e020a4d5994@inria.fr> (raw)
In-Reply-To: <23c53e70-4045-6812-9767-1bb60f70465e@inria.fr>
Le 13/11/2020 à 13:55, François Pottier a écrit :
> Yet I would intuitively expect it to be accepted, because
> the type [< `A > `A ] seems to be a subtype of the type [> `A ].
Replying to my own question, I note that the type-checker seems to
recognize that this subsumption relation holds when I use an
explicit coercion:
# let f x = (x : [`A] :> [> `A ]);;
val f : [ `A ] -> [> `A ] = <fun>
but it does not recognize it when comparing one module signature
against another module signature.
--
François Pottier
francois.pottier@inria.fr
http://cambium.inria.fr/~fpottier/
prev parent reply other threads:[~2020-11-13 13:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 12:55 François Pottier
2020-11-13 13:07 ` François Pottier [this message]
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=ad95e76b-8dfc-5ba0-0f26-7e020a4d5994@inria.fr \
--to=francois.pottier@inria.fr \
--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