caml-list - the Caml user's mailing list
 help / Atom feed
From: Christophe Troestler <>
To: Christopher Zimmermann <>
Cc: <>
Subject: Re: [Caml-list] How to narrow polymorphic variant phantom types
Date: Sun, 13 Jan 2019 11:10:02 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On 13 January 2019 at 08:49 CET, Christopher Zimmermann wrote:
> […] I'd like to express a typing like
> val dup : 'a perm -> [< `Read | `Write > 'a] desc -> 'a desc
> but a type variable inside the polymorphic variant type is not allowed.

How about

    val dup : ([< `Read | `Write ] as 'a) perm -> 'a desc -> 'a desc



Caml-list mailing list.  Subscription management and archives:
Bug reports:

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-13  7:49 Christopher Zimmermann
2019-01-13 10:10 ` Christophe Troestler [this message]

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror

AGPL code for this site: git clone public-inbox