|Anonymous | Login | Signup for a new account||2014-09-21 04:09 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004263||OCaml||Camlp4||public||2007-04-17 19:49||2010-04-29 14:18|
|Target Version||Fixed in Version||3.10+dev|
|Summary||0004263: AST mapping treats record labels as patterns; should they have type ident instead?|
|Description||Currently Camlp4 AST defines the record patterns as|
PaRec of loc and list (patt * patt)
and record expressions as
ExRec of Loc.t and binding and expr
where the binding can bind arbitrary patterns to expressions. This was not a big issue prior to 3.10, but now that 3.10 provides very powerful mapping and folding features, this seems a bit problematic. Namely, if I define a Camlp4 filter or an AST mapping function that affects patterns, the array labels will get affected as well, often in an undesired way.
Would it be better to have
PaRec of loc and list (ident * patt)
ExRec of loc and list (ident * expr) and expr
If so, it would seem that now is the time to make the change, as 3.10 is about to make major backwards-incompatible camlp4 changes anyway.
|Tags||No tags attached.|
That's now done in the CVS for patterns.
So << p1 = p2 >> becomes << i = p >>
That's now done for expressions too.
I've introduced (as suggested) the rec_binding type.
|2007-04-17 19:49||nogin||New Issue|
|2007-04-20 17:10||ertai||Note Added: 0004025|
|2007-04-27 11:32||ertai||Note Added: 0004037|
|2007-04-27 11:33||ertai||Assigned To||=> ertai|
|2007-04-27 11:33||ertai||Status||new => resolved|
|2007-04-27 11:33||ertai||Resolution||open => fixed|
|2007-04-27 11:33||ertai||Fixed in Version||=> 3.10+dev|
|2010-04-29 14:18||xleroy||Status||resolved => closed|
|Copyright © 2000 - 2011 MantisBT Group|