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

Printer does not agree with parser for anonymous type parameters in type definitions in revised syntax #5637

Closed
vicuna opened this issue Jun 6, 2012 · 4 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link

commented Jun 6, 2012

Original bug ID: 5637
Reporter: @garrigue
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2015-12-11T18:07:07Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.00.0+dev
Target version: 4.00.0+dev
Fixed in version: 4.00.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

The following phrase

type t _ = [ Int : t int ];

is accepted by camlp4r, but the resulting signature is output as

type t '_ = [ Int: t int ]

which cannot be parsed.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jun 28, 2012

Comment author: @damiendoligez

I cannot reproduce this, either with the dev or the beta:
command line:
camlp4r -printer Camlp4OCamlRevisedPrinter /tmp/foo.ml
output:
type t _ = [ Int : t int ];

Was this bug fixed inbetween, or do you use different options?

@vicuna

This comment has been minimized.

Copy link
Author

commented Jun 28, 2012

Comment author: @garrigue

I'm using
ocaml dynlink.cma camlp4r.cma

The bug is still there (both trunk and 4.00).
But indeed there is no problem when using the camlp4r command instead of the toplevel.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jun 28, 2012

Comment author: @bobzhang

I tried this problem before. It was reproduced using toplevel. As doligez said that it did not appear when using command line.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jul 9, 2012

Comment author: @xclerc

Everyone was right: it just happen that there are two different printers
depending whether you are inside or outside of the toplevel.

Fixed in trunk (revision 12668) and 4.00 (revision 12669) branches.

@vicuna vicuna closed this Dec 11, 2015

@vicuna vicuna added the camlp4 label Mar 14, 2019

@vicuna vicuna added this to the 4.00.0 milestone 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
You can’t perform that action at this time.