TL;DR need to specialize next-as-tuple to avoid its polymorphism
According to rule 7, we must call one of the with-* attributes in the next-as-tuple attribute. According to rule 4, we have only one next-as-tuple. Also, we cannot create an analog of monitoring function (this requires reflection). Therefore, we cannot specialize more than one type in such conditions.
I suggest creating specialized versions of the next-as-tuple-* attribute, similar to with-*. This requires changing rules 4 (add specialization), 5 (we need to know the type of the argument) and 7 (to be more specific).
TL;DR need to specialize
next-as-tuple
to avoid its polymorphismAccording to rule 7, we must call one of the
with-*
attributes in thenext-as-tuple
attribute. According to rule 4, we have only onenext-as-tuple
. Also, we cannot create an analog of monitoring function (this requires reflection). Therefore, we cannot specialize more than one type in such conditions.I suggest creating specialized versions of the
next-as-tuple-*
attribute, similar towith-*
. This requires changing rules 4 (add specialization), 5 (we need to know the type of the argument) and 7 (to be more specific).