-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
support explicit subtyping #236
Conversation
Currently, record types are shown in Record types can now subtype other record types. We could make code changes to ensure that One option is to leave |
This seems like the first in a series of steps towards the overly ambitious goals I set for myself with #162. Maybe it's time to close that PR, seeing as the branch has fallen quite far behind, and incremental steps probably will get us there faster. |
Aha! I thought we had discussed this. I searched issues but not pull requests, so failed to find #162. |
Let's merge #238 before taking further action here. |
3738d02
to
f0a50d7
Compare
This pull request is now ready to be reviewed. :) |
7cc678f
to
ec58641
Compare
ec58641
to
8766214
Compare
@@ -1677,6 +1761,8 @@ | |||
//. | |||
//. To define an anonymous record type one must provide: | |||
//. | |||
//. - an array of supertypes (exposed as `t.supertypes`); and | |||
//. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an erroneous inclusion. I will remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before:
After:
The primary reason for this change is to make defining subtypes more convenient. In the future the relationships this change exposes could be used to make type checking more efficient. If a value is not a member of
$.Number
, say, we know it is not a member of any of the subtypes of$.Number
either.