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

Ensure that scoping rules of the compiler & type checker are the same #56

Open
davazp opened this issue Mar 17, 2019 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@davazp
Copy link
Member

davazp commented Mar 17, 2019

Right now is too easy for the compiler to think that a variable is a primitive, but for the type checker to think it is a local variable instead.

Example:

(let ((:x 5))
  :x)

As of now (1ffcc66), the compiler will think the :x is an inline primitive. But the type checker will treat it as local variable.

A possible way to do this is to add a transformation phase to the AST before compiling/type checking where we do name resolution. Linking references to their definitions.

@davazp davazp added the enhancement New feature or request label Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant