Feature request: adding target to HB.instance
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.
@Tragicus do you have examples in mind for such mixins?
Not off the top of my head, but there is a trivial solution, which is giving an empty list of structures to the directive.
Like this?
#[ensures(eqType,foobarType)]
HB.instance Definition _ : fooMixin subject := ...
ensures(A)meansAand super-structures have been instantiated, but maybe more, errors ifAis not instantiatedexactly(A)meansAand super-structures have been instantiated, but nothing more, errors ifAis not instantiated.