I have one comment on the naming convention. Consider has_type/3 from the post. For example:
has_type(_, true, bool).
A better name for this would be:
term_type(_, true, bool).
or even:
context_term_type(_, true, bool).
This makes clear what each of the arguments means, and does not limit the reading to only one direction of use. Note that we can query this also in other directions, and the predicate still makes sense!
I have one comment on the naming convention. Consider has_type/3 from the post. For example:
A better name for this would be: or even: This makes clear what each of the arguments means, and does not limit the reading to only one direction of use. Note that we can query this also in other directions, and the predicate still makes sense!