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

Camlp4 Ident quotation #5649

Closed
vicuna opened this issue Jun 13, 2012 · 1 comment
Closed

Camlp4 Ident quotation #5649

vicuna opened this issue Jun 13, 2012 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jun 13, 2012

Original bug ID: 5649
Reporter: @bobzhang
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:07:01Z)
Resolution: not a bug
Priority: normal
Severity: minor
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

<:ident< Camlp4.Sig.MakeCamlp4Ast(Camlp4.PreCast.Loc).meta_bool >> ;

  • : Camlp4.PreCast.Ast.ident =
    IdApp
    (IdAcc (IdAcc (IdUid "Camlp4") (IdUid "Sig")) (IdUid "MakeCamlp4Ast"))
    (IdAcc
    (IdAcc (IdAcc (IdUid "Camlp4") (IdUid "PreCast")) (IdUid "Loc"))
    (IdLid "meta_bool"))

I get the output as above.
It's a bug or something I did not understand.
In my opinion, its output should be something like this:
(IdAcc
(IdApp
(IdAcc (IdAcc (IdUid "Camlp4") (IdUid "Sig")) (IdUid "MakeCamlp4Ast"))
(IdAcc (IdAcc (IdUid "Camlp4") (IdUid "PreCast")) (IdUid "Loc")))
(IdLid "meta_bool"))

@vicuna
Copy link
Author

vicuna commented Jun 13, 2012

Comment author: @diml

<:ident< Camlp4.Sig.MakeCamlp4Ast(Camlp4.PreCast.Loc).meta_bool >> ;

  • : Camlp4.PreCast.Ast.ident =
    IdApp
    (IdAcc (IdAcc (IdUid "Camlp4") (IdUid "Sig")) (IdUid "MakeCamlp4Ast"))
    (IdAcc
    (IdAcc (IdAcc (IdUid "Camlp4") (IdUid "PreCast")) (IdUid "Loc"))
    (IdLid "meta_bool"))

This is the expected output for quotations in revised syntax.

In my opinion, its output should be something like this:
(IdAcc
(IdApp
(IdAcc (IdAcc (IdUid "Camlp4") (IdUid "Sig")) (IdUid "MakeCamlp4Ast"))
(IdAcc (IdAcc (IdUid "Camlp4") (IdUid "PreCast")) (IdUid "Loc")))
(IdLid "meta_bool"))

This one is for quotations in original syntax.
To get the same thing in revised syntax you must write:

<:ident< (Camlp4.Sig.MakeCamlp4Ast Camlp4.PreCast.Loc).meta_bool >>

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna assigned ghost Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
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