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

Attach location to constants #10544

Closed
wants to merge 1 commit into from
Closed

Conversation

gpetiot
Copy link
Contributor

@gpetiot gpetiot commented Jul 28, 2021

I still run into instances of "... and ... make inconsistent assumptions over interface Stdlib" when compiling even after cleaning thoroughly, will try on a clean repo later, the tests may be broken in the meantime.

edit: undrafting the PR, maybe someone will have an idea about what's causing this

@gpetiot gpetiot marked this pull request as ready for review August 2, 2021 16:19
@xavierleroy
Copy link
Contributor

Could you please explain the motivation for this PR? Why is it a good idea to add locations to constants?

@gpetiot
Copy link
Contributor Author

gpetiot commented Aug 24, 2021

This is originally a change for ocamlformat (ocaml-ppx/ocamlformat#1749), someone suggested that I upstream this patch.

In ocamlformat we need to have the location of constants so we can re-attach the comments to the constants (and currently we have to read the literal source to retrieve the locations, whereas the parser can just provide them for free). Outside of ocamlformat, I don't know though.

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

Successfully merging this pull request may close these issues.

None yet

2 participants