Closed langston-barrett closed 11 months ago
Yes, this seems wise. We already do something similar for NonceAppExpr
s here:
We already do something similar for NonceAppExprs here:
I'm not sure this is analogous, actually - that case seems to be for Annotation
expressions, which are explicitly annotated (unlike BoundVarExpr
s, which are kind of "implicitly" annotated by virtue of already having a Nonce
). However, we could probably special-case NonceAppExpr
more generally in the same way - see #246.
The annotation mechanism (
annotateTerm
) attachesNonce
s to expressions via theAnnotation
constructor ofNonceApp
. Bound variables already have associatedNonce
s, theirbvarId
s. We should consider whetherannotateTerm
, when applied to aBoundExpr
, should return the term as-is, andgetAnnotation
could just return thebvarId
.