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

Add type variables and quantifiers to the AST #775

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

AltGr
Copy link
Contributor

@AltGr AltGr commented Jan 20, 2025

Note that they don't do much at the moment, basically this replaces TAny placeholders with type variables ; the translation to and from unionfind types is done on the boundaries of the typer. Structs and enums don't support quantifiers yet.

The type printer is also simplified and made less verbose by removing the _debug functions and not repeating the details of structs and enum every time.

AltGr added 3 commits January 21, 2025 17:37
Nothing is done with them at the moment; but that expands what can be expressed
and support can then be added progressively; in time, with this, special support
for operators could be limited to overloads.

- types "TAny" are replaced with fresh type variables.

- The monomorphisation pass obviously needs some more effort

- side change: the type printer is simplified to never explicit inline structure
  types, that just is too verbose on real code.
This doesn't of course implement generic monomorphisation over quantified types,
only fixes on par with what it could handle previously.
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

Successfully merging this pull request may close these issues.

1 participant