Browse thread
[Caml-list] extensible records again
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michael Vanier <mvanier@c...> |
| Subject: | Re: [Caml-list] extensible records again |
Achim,
I took up your suggestion and downloaded your code. In Opaque.ml I see
this mysterious declaration:
type opaque 'a =
{
data : !'b . 'b;
type_info : type_info 'a
}
and type_info 'a =
{
apply : opaque 'a -> 'a -> 'a;
compare : opaque 'a -> opaque 'a -> bool;
unify : opaque 'a -> opaque 'a -> bool
};
I realize that this uses the revised syntax, but I can't find any
documentation on what "!'b . 'b" is supposed to mean. It looks like a
universal quantifier on 'b -- correct?
Mike
> Date: Mon, 22 Mar 2004 09:13:55 +0100
> From: Achim Blumensath <blume@labri.fr>
> Mail-Followup-To: caml-list@inria.fr
>
> Michael Vanier wrote:
> > I've written a dynamically-typed language in ocaml, and I want to be able to
> > add new types to the language without having to add new primitive types to
> > the system.
>
> This weekend I have done something like this in ant:
>
> www-mgi.informatik.rwth-aachen.de/~blume/pub/ant-current.tar.bz2
>
> The type declarations are in
>
> VM/Types.ml and VM/Opaque.ml
>
> and an example showing how to define your own type in
>
> Markup/ALBindings.ml
>
> Achim
> --
> ________________________________________________________________________
> | \_____/ |
> Achim Blumensath \O/ \___/\ |
> LaBRI / Bordeaux =o= \ /\ \|
> www-mgi.informatik.rwth-aachen.de/~blume /"\ o----|
> ____________________________________________________________________\___|
>
> -------------------
> 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
>
-------------------
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