Currently, smart-ref uses the name of labels to determine whether the reference is a theorem, a lemma, or whatever.
I am trying to understand the possibility of an alternative approach in terms of some sort of typed bindings. I imagine that it is implemented as follows:
- Typed bindings have a “type” and the binding itself;
-
get-typed-binding
will return both the type and the binding if it is typed; -
get-binding
will return only the binding; -
set-typed-binding
will set a typed binding; - Modify the macros such as
next-theorem
which will invokeset-typed-binding
instead; -
smart-ref
analyzes the types in the typed binding, instead of the label name.
I am not sure how to implement this properly. For example, whether it is better to write this in macro or Scheme codes?