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

fix: monomorphising would fail under some circumstances #880

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

alecthomas
Copy link
Collaborator

I originally intended to replace DataRef references to type parameters, with concrete TypeParameter instances, but this ended up conflating the parameter declaration and the reference. Instead, it's now left as a DataRef, and I've made TypeParameter no longer implement Type.

Note that it being a DataRef doesn't make much sense either, because it's not a data structure, but that's part of a large issue where data references can also refer to verbs within the schema parsing. The correct solution here is to use an untyped Ref everwhere and resolve these to the correct reference types when validating.

I originally intended to replace `DataRef` references to type
parameters, with concrete `TypeParameter` instances, but this ended up
conflating the parameter declaration and the reference. Instead, it's
now left as a `DataRef`, and I've made `TypeParameter` no longer
implement `Type`.

Note that it being a `DataRef` doesn't make much sense either, because
it's not a data structure, but that's part of a large issue where data
references can also refer to verbs within the schema parsing. The
correct solution here is to use an untyped `Ref` everwhere and resolve
these to the correct reference types when validating.
@alecthomas alecthomas merged commit bcbf8f7 into main Feb 6, 2024
@alecthomas alecthomas deleted the aat/fix-monomorphising branch February 6, 2024 03:53
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