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

Language AST should only be parameterized by the parts that change. #42

Open
akuhlens opened this issue Mar 27, 2018 · 0 comments
Open

Comments

@akuhlens
Copy link
Collaborator

akuhlens commented Mar 27, 2018

For instance

(struct (Arity Args Ret) Fn ([arity : Arity][args : Args][ret : Ret]))

Should be instantiated up to the expression parameterization, and should have unneeded fields removed extra fields can be added for some passes by sub typing on structs. This will likely lead
to longer form definitions at the cost of less verbose types and code elsewhere.

(struct (Expr) Fn ([args : (Listof Expr)][ret : Expr])

Here we make the args list always be an args list, make the return type always match the parameter type, and remove the arity since it can be derived by taking the length of the argument list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant