Browse thread
Upgrading sexplib-2.7.0 to camlp4 3.10
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-05-01 (16:19) |
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 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? Or even shorter: <:match_case< ( $tup:Ast.paCom_of_list patts$ ) -> $expr$ >> -- Nicolas Pouillard