I see now. The syntax is just strange coming from OCaml. The
declaration there is the OCaml equivalent of:

type t = A | B | C of int | D of (int * string)

Sandro

On 3/6/07, Nicolas Cannasse <[EMAIL PROTECTED]> wrote:
> Browsing the NekoML docs:
>
> http://nekovm.org/doc/nekoml
>
> A "union type" declaration looks identical to the declaration of a
> "record". Is this correct? I don't see a discriminating tag anywhere.

They are not identical. A union type can have several disjoint
contructors (A,B,C,D in the example) while the record must have all the
fields correctly set (x + y in the example).

Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)


--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to