caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Lukasz Stafiniak" <lukstafi@gmail.com>
To: "Vincent Aravantinos" <vincent.aravantinos@gmail.com>
Cc: "Christopher L Conway" <cconway@cs.nyu.edu>,
	"Gurus Ocaml" <caml-list@inria.fr>
Subject: Re: [Caml-list] Depend-type beginner question
Date: Fri, 5 Oct 2007 18:51:58 +0200	[thread overview]
Message-ID: <4a708d20710050951h55bfca3cs4935fbab48ab146a@mail.gmail.com> (raw)
In-Reply-To: <BC1C7137-CD1E-4274-B261-2C42E9CA9578@gmail.com>

On 10/5/07, Vincent Aravantinos <vincent.aravantinos@gmail.com> wrote:
>
> Le 5 oct. 07 à 17:41, Christopher L Conway a écrit :
> >
> > 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 can't get how the following could ever be typed at compile time:
>
>  > if ... then [] else [a]
>
> Is this a 0-list or a 1-list ? do they just put an existential
> variable -> n-list ? If this is it, it seems to me that you won't be
> able to gain much information.
>
DML (or its successor ATS) is not really a dependently typed language
IIRC. It is a polymorphically typed language which can express _some_
dependency of types on values using e.g. singleton types. The upside
is that it can limit what can be expressed to a logic manageable at
compile time. The downside is that you are limited to, e.g., linear
inequalities over integers, and this forces you to lose information
e.g. by using existential quantification.


      parent reply	other threads:[~2007-10-05 16:52 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
2007-10-05 16:34       ` Vincent Aravantinos
2007-10-05 23:29         ` Arnaud Spiwack
2007-10-05 16:51     ` Lukasz Stafiniak [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=4a708d20710050951h55bfca3cs4935fbab48ab146a@mail.gmail.com \
    --to=lukstafi@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=cconway@cs.nyu.edu \
    --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).