-
Notifications
You must be signed in to change notification settings - Fork 0
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
Investigate constraining behaviour #85
Comments
A better way might be to explicitly indicate whether a subtype is acceptable, perhaps by having |
Unfolding the concrete types seems the most workable. I would just need to register the subtypes of every base type operator and add a |
While the above is a good idea, it becomes complicated when coupled with intersection and union types (#79), since |
Plan of attack:
Start with tests. |
We use All this does not amount to sane behaviour. This is why we should only accept the second idea, and when we want to be able to express a subtype guard, we must be explicit about it. How is still up for debate.
|
This renaming is done so that the `.subtypes()` and `.supertypes()` methods become available for `Type`s. This is helpful for #85, since it means we can generate sub/supertypes on demand.
Combining makes sense to do like so: |
Consider this:
... does not yield
F(A, A)
does yield
F(A, A)
.The logic for unifying with constraints doesn't make full sense. Why would it be okay to unify with base types, but not with variables?
Also, we should make sure that the following works:
The text was updated successfully, but these errors were encountered: