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

parameterized types #1084

Open
wants to merge 66 commits into
base: dev
Choose a base branch
from
Open

parameterized types #1084

wants to merge 66 commits into from

Conversation

xzxzlala
Copy link
Contributor

@xzxzlala xzxzlala commented Aug 18, 2023

Based on branch poly-adt-after2, I implemented the parameterized types.

  • I merged the forall type and typAp/typFun.

  • Add the forms tpatAp and let the var could appear in tpat and typ.

  • Add a new type "Ap" and its rules.

  • Add the statics of the parameterized types. (tyalias of Ap)

  • Revise the pattern match rules in evaluator to fit the "Forall" constructors.

SV0UKX3G7YF4TI5VMINYP0A

Here is an example of the parameterized types.
Note that the type of constructor of the parameterized types is Forall type, so we need to first use @<> to apply the type.

@xzxzlala xzxzlala marked this pull request as draft August 18, 2023 20:56
@xzxzlala xzxzlala changed the title Add: mold and forms of parameterized type parameterized types Aug 18, 2023
xzxzlala and others added 27 commits August 20, 2023 23:51
Add ground case for forall type (as Forall _ . ?).
@xzxzlala xzxzlala marked this pull request as ready for review September 10, 2023 19:14
@disconcision disconcision self-requested a review September 10, 2023 21:18
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.

6 participants