You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4263 Reporter: nogin Assigned to: ertai Status: closed (set by @xavierleroy on 2010-04-29T12:18:05Z) Resolution: fixed Priority: normal Severity: major Version: 3.10+dev Fixed in version: 3.10+dev Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Monitored by: nogin
Bug 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)
and
ExRec of loc and list (ident * expr) and expr
instead?
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.
The text was updated successfully, but these errors were encountered:
Original bug ID: 4263
Reporter: nogin
Assigned to: ertai
Status: closed (set by @xavierleroy on 2010-04-29T12:18:05Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.10+dev
Fixed in version: 3.10+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: nogin
Bug 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)
and
ExRec of loc and list (ident * expr) and expr
instead?
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.
The text was updated successfully, but these errors were encountered: