English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Defining a family of functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-28 (00:33)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] Defining a family of functors
Excerpts from David Teller's message of Tue Jan 27 22:12:59 +0100 2009:
> I'd like that, too. I may be wrong but I have the impression that most
> of this can already be done with the current type system of OCaml.
> Unless I'm mistaken, for first-class modules, you essentially need
> * extendable records (aka objects, good thing we already have them)

> * existential types (which may be encoded with universal types, and
> since we have universal types in classes, there may be a way to to this
> already)

The encoding of modules using existential types in non modular, this
basically means that you have to heavily transform the source.

What one need to encode modules is "open" existential types, this well
and clearly explained in this POPL'09 paper:

  «Modeling Abstract Types in Modules with Open Existential Types»,
    by Benoît Montagu and Didier Rémy

> * namespace (which I'm sure could be encoded somehow).
> Now, the syntax would certainly be awful, but if I'm right it wouldn't
> take too much to get these modules into the compiler.

Kind regards,

Nicolas Pouillard