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: Joel Reymont <joelr1@g...>
Subject: Re: Upgrading sexplib-2.7.0 to camlp4 3.10

On May 1, 2007, at 3:16 PM, Nicolas Pouillard wrote:

> 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

Then

     let matching =
       (
         <:patt< ( $tup:Ast.paCom_of_list patts$ ) >>,
         None,
         expr
       )

becomes

let patt = <:patt< ( $tup:Ast.paCom_of_list patts$ ) >> in
<:match_case< $patt$ -> $expr$ >>

Right?

	Thanks, Joel

--
http://wagerlabs.com/