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

Honor the #[local] attribute for HB.structure #428

Open
CohenCyril opened this issue Jun 27, 2024 · 3 comments
Open

Honor the #[local] attribute for HB.structure #428

CohenCyril opened this issue Jun 27, 2024 · 3 comments

Comments

@CohenCyril
Copy link
Member

The local attribute for HB.structure should make sure that the names are not exported in the global environement.

Spotted by @ggonthier

@gares
Copy link
Member

gares commented Jun 27, 2024

The operation names?
I think a silly test could clarify and work as a spec.

@CohenCyril
Copy link
Member Author

CohenCyril commented Jun 27, 2024

Module A.
HB.mixin M T := { op : T }.
#[local] HB.structure S := { T of M T }.
End A.
Import A.
Fail Check op. (* intended behaviour *)
Check A.op.

@gares
Copy link
Member

gares commented Jun 27, 2024

Ok, as in Local Definition op := ..., I think we have the API already, @local! => coq.env.add-const ... should do it.

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

No branches or pull requests

2 participants