caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Arnaud Spiwack <Arnaud.Spiwack@lix.polytechnique.fr>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: "Jocelyn Sérot" <Jocelyn.SEROT@ubpmes.univ-bpclermont.fr>,
	"OCaML Mailing List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Dependent types ?
Date: Tue, 27 Sep 2011 11:41:16 +0200	[thread overview]
Message-ID: <CAMoPVjc1FmKtrrcz7n4jCGH0e4+jPgrSB-G23pB6SM-Km829mg@mail.gmail.com> (raw)
In-Reply-To: <CAPFanBHKHWsgPLZo7GpzWj8tjY1u4DM2V7z7DiMb+b7O57eOGA@mail.gmail.com>

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

> Yes, this is right. You can already experiment in ocaml, as Denis
> Berthod suggested, by adding abstract types by hand instead of having
> constants in the initial environment.
>

You can also embed the natural numbers in Ocaml's type system by declaring
the following two types:

type 'a s
type z

Granted 32 would be written z s s s s s s s s s s s s s s s s s s s s s s s
s s s s s s s s s which may or may not be considered legible. But at least
there is no absolute need for infinitely many constants.

[-- Attachment #2: Type: text/html, Size: 714 bytes --]

  reply	other threads:[~2011-09-27  9:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 11:42 Jocelyn Sérot
2011-09-26 12:07 ` Thomas Braibant
2011-09-26 12:13 ` Denis Berthod
2011-09-26 12:45   ` Yaron Minsky
2011-09-26 12:56     ` Denis Berthod
2011-09-26 15:55     ` Jocelyn Sérot
2011-09-26 16:44       ` Gabriel Scherer
2011-09-26 21:09         ` Christophe Raffalli
2011-09-27  8:34           ` Jocelyn Sérot
2011-09-27  8:23         ` Jocelyn Sérot
2011-09-27  9:16           ` Gabriel Scherer
2011-09-27  9:41             ` Arnaud Spiwack [this message]
2011-09-27 12:25               ` Jocelyn Sérot
2011-09-27 14:13           ` oliver
2011-09-27  8:27     ` Jocelyn Sérot
2011-09-26 22:51 ` oliver
2011-09-27 22:12 Damien Guichard
2011-09-28  7:27 ` Denis Berthod

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=CAMoPVjc1FmKtrrcz7n4jCGH0e4+jPgrSB-G23pB6SM-Km829mg@mail.gmail.com \
    --to=arnaud.spiwack@lix.polytechnique.fr \
    --cc=Jocelyn.SEROT@ubpmes.univ-bpclermont.fr \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@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).