Tyvar_namer and Var_namer contain a suspicious amount of duplications.
They also serve similar purposes in nature -- renaming, so we can generate new unique string names, in whatever namespace (e.g., variable or type variable).
This PR puts them together into a Namer module and put it under the common directory.
Although we can abstract over the two renaming process even further (check out how they fold over expressions), but I think that's borderline over-abstraction, since they aren't exactly the same. I'll come back to this later if I'm proven wrong, which is likely.
Tyvar_namer
andVar_namer
contain a suspicious amount of duplications.They also serve similar purposes in nature -- renaming, so we can generate new unique string names, in whatever namespace (e.g., variable or type variable).
This PR puts them together into a
Namer
module and put it under thecommon
directory.Although we can abstract over the two renaming process even further (check out how they fold over expressions), but I think that's borderline over-abstraction, since they aren't exactly the same. I'll come back to this later if I'm proven wrong, which is likely.