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

Provide a way to give names to canonical instances #328

Open
CohenCyril opened this issue Dec 7, 2022 · 5 comments
Open

Provide a way to give names to canonical instances #328

CohenCyril opened this issue Dec 7, 2022 · 5 comments

Comments

@CohenCyril
Copy link
Member

CohenCyril commented Dec 7, 2022

e.g.

#[instances(suffix="_ring")]
HB.structure Definition Ring := {...}.
HB.instance Definition _ := Ring.Build Z ....
Check (Z : Ring.type).
(* output should be: Z_ring : Ring.type *)
@gares
Copy link
Member

gares commented Dec 7, 2022

But why Z and not Zarith_Z (or something like that, which is what it uses today before __canonical__Bli_Bla)?

@gares
Copy link
Member

gares commented Dec 7, 2022

#[instances(suffix="_ring")]
HB.structure Definition Ring := {...}.
#[name="Z"] (* or #[name(short)] *)
HB.instance Definition _ := Ring.Build Z ....
(* Z_ring, Z_zmod, Z_whatever *)

@gares
Copy link
Member

gares commented Dec 7, 2022

Maybe using the short name of the key should be the default.
But IIRC somewhere the key is "T" or some other silly name if you don't include the enclosing module.

@CohenCyril
Copy link
Member Author

Maybe using the short name of the key should be the default.

I agree

@proux01
Copy link
Contributor

proux01 commented Dec 11, 2024

C.f. #463

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

3 participants