struct SliceC{ObT, HomT, C<:Model{Tuple{ObT, HomT}}} <: Model{Tuple{SliceOb{ObT, HomT}, HomT}}
cat::C
over::ObT
end
@instance ThCategory{SliceOb{ObT, HomT}, HomT} (;model::SliceC{ObT, HomT, C}) where {ObT, HomT, C} begin
...
We want to constrain the C of SliceC to be a type which is not just a Model but a model which implements ThCategory. However, we can only know at runtime if this is the case.
So there should be an overloadable is_valid_instance() method in the @instance declaration that will make calls to implements.
For example, slice categories:
We want to constrain the
C
ofSliceC
to be a type which is not just aModel
but a model which implementsThCategory
. However, we can only know at runtime if this is the case.So there should be an overloadable
is_valid_instance()
method in the@instance
declaration that will make calls toimplements
.