caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Teller <David.Teller@mlstate.com>
To: Jacques Carette <carette@mcmaster.ca>
Cc: Andrej Bauer <andrej.bauer@andrej.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Defining a family of functors
Date: Tue, 27 Jan 2009 22:12:59 +0100	[thread overview]
Message-ID: <1233090779.6463.10.camel@Blefuscu> (raw)
In-Reply-To: <497F1E8D.2080000@mcmaster.ca>

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)
* 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.

Cheers,
 David

On Tue, 2009-01-27 at 09:47 -0500, Jacques Carette wrote:
> Bottom line: I too very much wish for first-class, higher-order 
> modules.  As O'Caml already has open and closed products (viz rows and 
> records), open and closed sums (viz polymorphic and 'normal' variants), 
> the resulting system could steal back the 'elegant' monicker that has 
> drifted towards Haskell.
> 
> Jacques



  reply	other threads:[~2009-01-27 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 15:08 Michaël Grünewald
2009-01-26 15:15 ` [Caml-list] " Jacques Carette
2009-01-27 14:30   ` Andrej Bauer
2009-01-27 14:47     ` Jacques Carette
2009-01-27 21:12       ` David Teller [this message]
2009-01-28  0:32         ` Nicolas Pouillard
2009-01-28 11:25           ` David Teller
2009-01-29  9:37             ` nicolas.pouillard
2009-01-29 10:40               ` David Allsopp
2009-01-29 21:14                 ` Mauricio Fernandez
2009-01-30  8:25                   ` Michaël Grünewald

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=1233090779.6463.10.camel@Blefuscu \
    --to=david.teller@mlstate.com \
    --cc=andrej.bauer@andrej.com \
    --cc=caml-list@inria.fr \
    --cc=carette@mcmaster.ca \
    /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).