Version française
Home     About     Download     Resources     Contact us    
Browse thread
Upgrading sexplib-2.7.0 to camlp4 3.10
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: Upgrading sexplib-2.7.0 to camlp4 3.10
On 5/1/07, Joel Reymont <joelr1@gmail.com> wrote:
> RfTag is gone, apparently. How do you process variants then?
>
> The only reference to constructors I could find is with_constr in
> Camlp4Ast.partial.ml. It's applicable to modules, apparently.

For variants you have:

type, t ::= ... | `id | `id of t | `id of & t | t & t

<< `id >> was encoded as RfTag(_loc, true, [])
<< `id of t1 & ... & tN >> by RfTag(_loc, false, [t1; ...; tN])
<< `id of & t1 & ... & tN >> by RfTag(_loc, true, [t1; ...; tN])

However I suggest you comment that part and try to go further with
poly variants at a first glance.

-- 
Nicolas Pouillard