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

Feature request: adding target to HB.instance #448

Open
CohenCyril opened this issue Oct 2, 2024 · 3 comments
Open

Feature request: adding target to HB.instance #448

CohenCyril opened this issue Oct 2, 2024 · 3 comments

Comments

@CohenCyril
Copy link
Member

If we add a directive to HB.instance in order to specify exacly which structures (and super-structures) are meant to be instanciated, we gain in stability, and error messages become more accurate (e.g. when one wants to instanciate a structure and nothing happens, they get an error message).
The only problem, @Tragicus mentionned, is the case of mixins which are not enough to instanciate a full structure: we should come up with a way to deal with that.

@CohenCyril
Copy link
Member Author

@Tragicus do you have examples in mind for such mixins?

@Tragicus
Copy link

Tragicus commented Oct 2, 2024

Not off the top of my head, but there is a trivial solution, which is giving an empty list of structures to the directive.

@gares
Copy link
Member

gares commented Oct 2, 2024

Like this?

#[ensures(eqType,foobarType)]
HB.instance Definition _ : fooMixin subject := ...

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

3 participants