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

Keep user-defined ADTs after typechecking pass #889

Merged
merged 2 commits into from Oct 5, 2020

Conversation

anton-trunov
Copy link
Contributor

Since identifiers after this pass need to be annotated
with types, we add a dummy type ascription with Unit type.

Since identifiers after this pass need to be annotated
with types, we add a dummy type ascription with Unit type.
Copy link
Contributor

@jjcnn jjcnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to play around with changing the entry in Syntax.ml from

| LibTyp of ER.rep SIdentifier.t * ctr_def list

to

| LibTyp of SR.rep SIdentifier.t * ctr_def list

because that would eliminate the need to assign a type to the name of the type.

However, it gets really annoying when checking for duplicate names, so I think we should go for your solution.

@anton-trunov anton-trunov merged commit b16aa2e into master Oct 5, 2020
@anton-trunov anton-trunov deleted the keep-user-adts-in-ast branch October 5, 2020 14:08
@anton-trunov
Copy link
Contributor Author

Thanks!

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.

None yet

3 participants