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

Replace uses of empty type application by references #193

Open
andrevidela opened this issue Oct 22, 2019 · 1 comment
Open

Replace uses of empty type application by references #193

andrevidela opened this issue Oct 22, 2019 · 1 comment
Labels
feature:enhancement Enhancements that do not affect core functionality

Comments

@andrevidela
Copy link
Collaborator

Currently, we use empty type application to represent in-scope references. This poses some problems when resolving specialisation references in the extendContext and inside each backend.

A solution to this would be to incrementally build the context from the list of previous definitions:

(name bit (+ 1 1))
(name byte (* bit bit bit bit bit bit bit bit))

would be represented as:

Vect 2 (TDef' 0 True)

and the first step of compilation would map this structure to

(context: Vect 1 (TDef' 0 False), remaining: Vect 1 (TDef' 0 True))

Just like a typical compiler would add variable declaration to the context.

@andrevidela
Copy link
Collaborator Author

Basically stop using TApp"type" T0 [] for references that are replaced last minute and pull them from an incrementally built context

@andrevidela andrevidela added the feature:enhancement Enhancements that do not affect core functionality label Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:enhancement Enhancements that do not affect core functionality
Projects
None yet
Development

No branches or pull requests

1 participant