Closed phlegmaticprogrammer closed 10 years ago
After some thought I think that having different constructors for Consts and Vars is just too useful to give up. What this means for printing terms is that alpha-conversion has to take place during / before printing when a situation occurs where a constant name would be hidden by a variable name.
This has been resolved by doing alpha-conversion during printing if necessary.
Right now Vars and Consts have different constructors. This produces a problem when printing, because when a var has the same name as a constant, and the constant is referred to inside the context of the var, then this term cannot be printed without switching constant and var. So it seems that Vars and Consts should be really the same in the term such that this cannot happen. Or, alternatively, make terms illegal which behave like that.