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