From: Andreas Rossberg <rossberg@ps.uni-sb.de>
To: Francois.Pottier@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Encoding "abstract" signatures
Date: Tue, 07 May 2002 11:14:07 +0200 [thread overview]
Message-ID: <3CD79ADF.57E5B040@ps.uni-sb.de> (raw)
In-Reply-To: <20020506092740.B11517@pauillac.inria.fr>
François,
> It would be interesting to devise a type system that has this property. Didier
> Rémy noticed the need for such a feature back in 1994 when writing `Dynamic
> typing in polymorphic languages' (see section 4.2 of the SRC tech report).
Ah, indeed, he is discussing something quite similar. Interesting.
But I strongly suspect that even a system like that wouldn't be enough
to encode OCaml's modules. Consider that higher-order type again:
functor(Y : sig module type T end) -> functor(X : Y.T) -> ...
The idea was representing this as
Forall k. forall T:(k->*). forall ts:k. T(ts) -> ... (*)
But that is still not good enough, because we might apply
T = sig module type U module type V end
The result had to be something like
Forall k1. Forall k2. forall U:(k1->*). forall V:(k2->*). ...
so (*) is not an appropriate encoding -- application may also result in
an indefinite number of kind quantifiers. We might try to tackle that by
introducing another universe of "hyperkinds" and repeat the same trick.
But unfortunately, that just pushes the problem to yet another level --
no finite number of additional universes will help, because what OCaml
provides with nested abstract signatures is essentially Type:Type.
So I conjecture that it is impossible to faithfully encode OCaml's
modules into a non-dependent system (which comes to no surprise taking
into account that it is known to be undecidable).
--
Andreas Rossberg, rossberg@ps.uni-sb.de
"Computer games don't affect kids; I mean if Pac Man affected us
as kids, we would all be running around in darkened rooms, munching
magic pills, and listening to repetitive electronic music."
- Kristian Wilson, Nintendo Inc.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-05-07 9:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-29 13:35 [Caml-list] Polymorphic Variants and Number Parameterized Typ es Krishnaswami, Neel
2002-04-29 14:16 ` [Caml-list] Polymorphic Variants and Number Parameterized Types Andreas Rossberg
2002-04-29 15:28 ` Francois Pottier
2002-04-29 16:48 ` Andreas Rossberg
2002-04-30 7:07 ` Francois Pottier
2002-04-30 10:34 ` [Caml-list] Encoding "abstract" signatures Andreas Rossberg
2002-04-30 15:18 ` [Caml-list] " Francois Pottier
2002-05-01 13:19 ` Andreas Rossberg
2002-05-02 7:47 ` Francois Pottier
2002-05-02 9:32 ` Andreas Rossberg
2002-05-06 7:27 ` Francois Pottier
2002-05-07 9:14 ` Andreas Rossberg [this message]
2002-04-30 10:04 ` [Caml-list] Modules and typing John Max Skaller
2002-04-30 11:51 ` Francois Pottier
2002-04-30 23:24 ` John Max Skaller
2002-05-01 8:08 ` Noel Welsh
2002-05-02 6:52 ` Francois Pottier
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=3CD79ADF.57E5B040@ps.uni-sb.de \
--to=rossberg@ps.uni-sb.de \
--cc=Francois.Pottier@inria.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