Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename TypeVar and friends #258

Open
gelisam opened this issue Nov 1, 2024 · 2 comments
Open

rename TypeVar and friends #258

gelisam opened this issue Nov 1, 2024 · 2 comments
Labels
refactoring An implementation change with no effect on Klister programs

Comments

@gelisam
Copy link
Owner

gelisam commented Nov 1, 2024

The word "TypeVar" is used to mean two different things in our codebase:

  1. a type unification variable. The type is MetaPtr (itself a confusing name because it's not one of those mortise/tenon Ptrs, and because this name is inconsistent with KindVar, the kind-level equivalent), but the TypeStore maps each MetaPtr to a TVar (itself a confusing name because it means Type Variable, not Control.Concurrent.STM.TVar), whose fields are set via functions named setTVLinkage and setTVLevel
  2. a scheme variable. The type is just Natural (though I have just opened a PR to wrap it in a SchemeVar newtype), but ETypeVar (introduced by prepareTypeVar) is the primitive macro for expanding a symbol to a scheme variable.

I would like to clean up this confusing terminology. How about the following renamings?

  1. MetaPtr -> TypeVar
  2. TVar -> TypeVarInfo
  3. ETypeVar -> ESchemeVar
  4. prepareTypeVar -> prepareSchemeVar
@gelisam gelisam added the refactoring An implementation change with no effect on Klister programs label Nov 1, 2024
@gelisam
Copy link
Owner Author

gelisam commented Nov 2, 2024

Or maybe this?

  1. MetaPtr -> TypeVar
  2. SplitCorePtr -> SplitCoreMortise etc.

@gelisam
Copy link
Owner Author

gelisam commented Nov 2, 2024

while we're at it, ExprF should probably be called StxF, since syntax objects are used to construct patterns etc., not just expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring An implementation change with no effect on Klister programs
Projects
None yet
Development

No branches or pull requests

1 participant