Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backquoted tuple is not available in lhs of rule #4120

Closed
vicuna opened this issue Sep 23, 2006 · 1 comment
Closed

Backquoted tuple is not available in lhs of rule #4120

vicuna opened this issue Sep 23, 2006 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Sep 23, 2006

Original bug ID: 4120
Reporter: hirokawa
Assigned to: ertai
Status: closed (set by ertai on 2006-09-25T14:39:33Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: hirokawa

Bug description

Hello,

In the lhs of rules in EXTEND .. END
a backquoted tuple is not available
because of some unbound variable (__camlp4_0).
The version I used is 3.10+dev8 (2006-06-26).

$ cat a.ml
EXTEND Gram
abc: [ [ `(x,y) -> "z" ] ];
END

$ camlp4of -printer OCaml a.ml
Gram.extend (abc : 'abc Gram.Entry.t)
((fun () ->
(None,
[ (None, None,
[ ([ Gram.Stoken
(((function | (_, ) -> true | _ -> false), "(, _)")) ],
(Gram.Action.mk
(fun ((x, y) : Gram.Token.t) (_loc : Loc.t) ->
match __camlp4_0 with
| (x, y) -> ("z" : 'abc)
| _ -> assert false))) ]) ]))
())

PS.
Concerning bug reports on new Camlp4, should I wait
until the pre-release of new Camlp4?

Additional information

No no don't wait that's fine to catch many bugs as possible.

@vicuna
Copy link
Author

vicuna commented Sep 25, 2006

Comment author: ertai

Fixed in the CVS (will be soon in the extern CVS).

BTW in your example you have an irrefutable pattern. My advice is to only use non irrefutable patterns. Tuples are still useful `(A x, y).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant