From: Jeremie Dimino <jdimino@janestreet.com>
To: "Milan Stanojević" <milanst@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] open extensible types representation
Date: Tue, 13 May 2014 17:07:34 +0100 [thread overview]
Message-ID: <CANhEzE7V9HKj9Y_yqbR72o0hKg-HvvvBRDyEo9BRTxB3LbcP9w@mail.gmail.com> (raw)
In-Reply-To: <CAKR7PS92EjrW60hD3+MCUpaog1abdSsByi-H+RCg1iOWrcT_NQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]
For a constructor argument it is a constructed value of size 2 and tag
[Obj.object_tag]:
- the first field of this value is a string, it is the name of the
constructor
- the second field is a unique integer identifier
For a constructor with [n] arguments, it is of value of size [n+1]. The
first field points to the same 2-fields constructed value described above
and the other fields are the arguments.
The reason the tag of the constructor "bucket" is [Obj.object_tag] is so
that the generic [Pervasives.compare] compares only the integer identifiers
in the second fields.
On Tue, May 13, 2014 at 4:53 PM, Milan Stanojević <milanst@gmail.com> wrote:
> 4.02 will have extensible data types.
>
> What is the runtime representation of an extensible data type?
>
> Thanks!
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
--
Jeremie
[-- Attachment #2: Type: text/html, Size: 1753 bytes --]
next prev parent reply other threads:[~2014-05-13 16:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 15:53 Milan Stanojević
2014-05-13 16:07 ` Jeremie Dimino [this message]
2014-05-13 16:08 ` Jeremie Dimino
2014-05-13 16:39 ` Milan Stanojević
2014-05-13 16:57 ` Jeremie Dimino
2014-05-14 18:11 ` Milan Stanojević
2014-05-14 18:41 ` Alain Frisch
[not found] ` <5373B924.9020206@lexifi.com>
2014-05-14 20:56 ` Milan Stanojević
2014-05-14 23:33 ` Leo White
2014-05-13 16:37 ` Frédéric Bour
2014-05-13 17:51 ` Frédéric Bour
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=CANhEzE7V9HKj9Y_yqbR72o0hKg-HvvvBRDyEo9BRTxB3LbcP9w@mail.gmail.com \
--to=jdimino@janestreet.com \
--cc=caml-list@inria.fr \
--cc=milanst@gmail.com \
/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