Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] recursive polymorphic variants?
Date: Sat, 20 Aug 2005 14:23:16 +0100	[thread overview]
Message-ID: <200508201423.16571.jon@ffconsultancy.com> (raw)
In-Reply-To: <20050819.065118.03980029.garrigue@math.nagoya-u.ac.jp>

On Thursday 18 August 2005 22:51, Jacques Garrigue wrote:
> Have a look at "Private rows: abstracting the unnamed" and
> "Code reuse through polymorphic variants" at
> http://www.math.nagoya-u.ac.jp/~garrigue/papers/
>
> They both give examples of how to define extensible languages using
> polymorphic variants. The first one relies on an experimental feature
> only available in the CVS version of ocaml.

Excellent papers, thanks.

Firstly, may I ask if there is an ETA on the release of a new OCaml version 
with this added functionality?

Secondly, I've been playing around with a term-level interpreter for a DSL 
and, in particular, have been looking at including O(n log n) patterns as 
well as a the usual linear patterns. I've done this by supplementing the 
usual list and array containers with a built-in set container based upon the 
one in OCaml's stdlib.

As this is a set of values and a value can be a set, there is an obvious 
recursion. I implemented it by cut and pasting the stdlib code into my own 
and altering it to have mutually recursive "value set" and "value" comparison 
functions.

Would your private row types let me do this without cut and pasting the code? 
I can't see how, but I'm hoping. :-)

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


  parent reply	other threads:[~2005-08-20 13:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18 21:27 Norman Ramsey
2005-08-18 21:51 ` [Caml-list] " Jacques Garrigue
2005-08-20 11:57   ` skaller
2005-08-20 13:23   ` Jon Harrop [this message]
2005-08-20 13:50     ` Alain Frisch

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=200508201423.16571.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.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