From: Markus Mottl <mottl@miss.wu-wien.ac.at>
To: Michael Welsh Duggan <md5i@cs.cmu.edu>
Cc: caml-list@inria.fr
Subject: Re: Recursive Sets?
Date: Thu, 3 Aug 2000 15:55:18 +0200 [thread overview]
Message-ID: <20000803155518.A18931@miss.wu-wien.ac.at> (raw)
In-Reply-To: <v1tbszbfr58.fsf_-_@takayama.mt.cs.cmu.edu>; from md5i@cs.cmu.edu on Wed, Aug 02, 2000 at 14:34:59 -0400
On Wed, 02 Aug 2000, Michael Welsh Duggan wrote:
> I have been trying to create a recursive type which can express sets
> of itself. The following code is not meant to be correct (it isn't),
> but hopefully expresses the sort of thing I want to do. Can someone
> throw some ideas at me?
I am afraid, but it is not possible to have mutually recursive module
and type definitions. See the following entry in the archive:
http://pauillac.inria.fr/bin/wilma_hiliter/caml-list/199901/msg00016.html?line=47#hilite
I don't know what exactly you want to do. Some time ago I implemented a
referentially transparent directory service that might be similar to what
you want to implement, e.g.:
+-root-+
/ | | \
a b \ c
| / f
d e /|\
g h i
It is possible to update nodes directly without losing persistence. E.g.:
let dir1 = (* directory as above,
the "current working directory" is "root" *) in
let dir2 = Dir.cd_path dir1 ["f"; "h"; "x"] ...
This will keep "dir1" unchanged, but "dir2" will look as follows (the
CWD will be "root/f/h/x"):
+-root-+
/ | | \
a b \ c
| / f
d e /|\
g h i
|
x
You can parameterize the directory over arbitrary ordered elements. If it
is something like this you need, I could place it online (though, it is
part of a larger project that I'll release in a few weeks, anyway - not
much time right now)...
Regards,
Markus Mottl
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
next prev parent reply other threads:[~2000-08-03 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-02 18:34 Michael Welsh Duggan
2000-08-03 13:55 ` Markus Mottl [this message]
2000-08-09 0:25 ` Jean-Christophe Filliatre
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=20000803155518.A18931@miss.wu-wien.ac.at \
--to=mottl@miss.wu-wien.ac.at \
--cc=caml-list@inria.fr \
--cc=md5i@cs.cmu.edu \
/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