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

Bug: AST diff around pcd_vars #2517

Closed
alanechang opened this issue Jan 26, 2024 · 1 comment · Fixed by #2518
Closed

Bug: AST diff around pcd_vars #2517

alanechang opened this issue Jan 26, 2024 · 1 comment · Fixed by #2518

Comments

@alanechang
Copy link
Contributor

alanechang commented Jan 26, 2024

The example program:

type _ g = MkG : 'a . 'a g;;

gets formatted into:

type _ g = MkG : 'a g

producing unequal ASTs:

19d18
<                   pcd_vars = 'a

fmt_constructor_arguments_result in Fmt_ast is the relevant function here. Wonder if we should keep 'a . or opt to add some additional normalization logic.

@Julow
Copy link
Collaborator

Julow commented Feb 1, 2024

Thanks for the report! This should be fixed by #2518

This is a quick and dirty fix, though. Ideally, we'd separate the code that recognize what form of constructor we're formatting and the code that formats it.
This is usually done in the Sugar module. Contribution welcome :)

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

Successfully merging a pull request may close this issue.

2 participants