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:
>
> On May 1, 2007, at 2:35 PM, Nicolas Pouillard wrote:
>
> > So where you see (p, e) you can write <:binding< $p$ = $e$ >>.
>
> I took care of the issue by using the above at the source that
> generated bindings.
>
> In the same sexp_of_tuple there's
>
>      let matching =
>        (
>          <:patt< ( $list:patts$ ) >>,
>          None,
>          expr
>        )
>      in
>      `Match [matching]

Here there is two things. The first one is about $list:patts$ that is
like the problem with tuples, so you can use <:patt< (
$tup:Ast.paCom_of_list patts$ ) >>.
The second one is about match cases, the old type was (patt * expr
option * expr) list, now it's match_case

match_case, mc ::= (* empty *)
                                 | mc1 | mc2
                                 | p -> e
                                 | p when e1 -> e2

-- 
Nicolas Pouillard