caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Difference between [ `A ] and [< `A ]
Date: Wed, 11 May 2011 17:47:32 +0200	[thread overview]
Message-ID: <4DCAAF94.8010206@univ-savoie.fr> (raw)
In-Reply-To: <35C81D78-50FE-47D2-93E2-F48FF4AEED3F@math.nagoya-u.ac.jp>

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]


> For instance, [<  `A of int] and [< `A of bool] are unifiable, giving [< `A of int & bool],

OK ... this means you can write (I tested in 3.11.2) :

# type ('a,'b,'c) inter = [< `A of 'b & 'c] as 'a;;
type ('a, 'b, 'c) inter = 'a constraint 'a = [< `A of 'b & 'c ]

which seems to be a type isomorphic to the intersection type of 'b and 'c ...

does this mean we can play with intersection type in OCaml (using some type cast because
intersection type is undecidable ...)

In other word : can we encode system D in OCaml ?

Cheers,
Christophe


-- 
Christophe Raffalli
Universite de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tel: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

      reply	other threads:[~2011-05-11 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 16:46 Dario Teixeira
2011-05-10 23:44 ` Jacques Garrigue
2011-05-11 15:47   ` Christophe Raffalli [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=4DCAAF94.8010206@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.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;
as well as URLs for NNTP newsgroup(s).