caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: Vincent Aravantinos <vincent.aravantinos@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Depend-type beginner question
Date: Fri, 05 Oct 2007 18:18:42 +0200	[thread overview]
Message-ID: <470663E2.2060702@univ-savoie.fr> (raw)
In-Reply-To: <BC1C7137-CD1E-4274-B261-2C42E9CA9578@gmail.com>

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

Vincent Aravantinos a écrit :
> 
> Le 5 oct. 07 à 17:41, Christopher L Conway a écrit :
> 
>> On 10/5/07, Vincent Aravantinos <vincent.aravantinos@gmail.com> wrote:
>>> why actually dependant types cannot be implemented in ocaml ? Is the
>>> type checking undecidable ? Or is it for other reason (e.g.
>>> arithmetic) ? I guess it's both. But could someone develop precisely ?
>>
>> It's not that dependent types can't be implemented in OCaml, just that
>> they haven't. See, e.g., http://www.cs.bu.edu/~hwxi/DML/DML.html
>>
>> I suspect the OCaml development team is not inclined to add "sexier"
>> types to the core language, though I can't say if there are any
>> specific technical hurdles preventing it (certainly, decidability is
>> an issue)...
> 
> I can't get how the following could ever be typed at compile time:
> 
>> if ... then [] else [a]
> 

if b then  [] else [a] has type list(if b then 0 else 1)
where is the problem ?

if b then 0 else 1 may or may not be simplified if you know b.

The problem is that equality over such complex types in undecidable and you have
to provide proofs ...




-- 
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: 252 bytes --]

  parent reply	other threads:[~2007-10-05 16:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 15:32 Vincent Aravantinos
2007-10-05 15:41 ` [Caml-list] " Christopher L Conway
2007-10-05 15:53   ` Vincent Aravantinos
2007-10-05 16:05     ` Ashish Agarwal
2007-10-05 16:15       ` Vincent Aravantinos
2007-10-05 16:18     ` Christophe Raffalli [this message]
2007-10-05 16:34       ` Vincent Aravantinos
2007-10-05 23:29         ` Arnaud Spiwack
2007-10-05 16:51     ` Lukasz Stafiniak

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=470663E2.2060702@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=caml-list@inria.fr \
    --cc=vincent.aravantinos@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;
as well as URLs for NNTP newsgroup(s).