Function libunseemly::alpha::substitute [−][src]
Expand description
Substitute VariableReference
s in node
, according to env
.
TODO: don’t use this to “capture the environment”; it doesn’t work in the presence of recursion
Instead, we should introduce a “constant” to Beta. (Does SameAs
suffice now?)
TODO: because of mu’s use of VariableReference
s in a place where other Ast
s are forbidden,
it seems like this has limited use.
TODO: this isn’t capture-avoiding (and shouldn’t be, when called by freshen_rec
)
It’s safe to use when the RHS of the environment is just fresh names.