-
Notifications
You must be signed in to change notification settings - Fork 78
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
Track quality of jkinds #3505
base: aspsmith/jkind-in-types
Are you sure you want to change the base?
Track quality of jkinds #3505
Conversation
f7e73cf
to
4636749
Compare
9fb7e36
to
f2d1d14
Compare
4636749
to
5c180a9
Compare
f2d1d14
to
5e3b03c
Compare
719d602
to
d3b1f27
Compare
Sometimes, inferred jkinds for a type are not exact, but instead *upper bounds*; later, we might learn more about a type that causes us to lower that jkind bound. For example, we might substitute a type variable, or perform `with` substitution on an abstract type in a module type. It's important to know whether this might happen, so that we can avoid normalizing away types with jkinds that might get "better" later from with-bounds during jkind normalization. This commit adds a new "jkind_quality" type, and a "quality" field to jkind, that tracks whether an inferred jkind is "best" or "not best", and sets this to the correct value everywhere jkinds are constructed. Nothing actually /reads/ this field yet, but this will be used during normalization in a subsequent commit.
d3b1f27
to
523ec09
Compare
Reviewed two commits ("add some extra comments from review".."more comments, specifically documenting quality"). They look good to me. |
we don't want to mark stuff as best too early, here; instead we want to wait until we've added all the necessary bounds (such that we /actually/ have a best kind!)
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.
Checked the most recent commits ("Define the jkind of or_null once, rather than redefining in typedecl".."simplify best jkinds in predef for type1s", "format").
it's weird, and we don't need it, so let's just remove it
Reviewed latest commits. This one looks good |
Sometimes, inferred jkinds for a type are not exact, but instead upper bounds;
later, we might learn more about a type that causes us to lower that jkind
bound. For example, we might substitute a type variable, or perform
with
substitution on an abstract type in a module type. It's important to know
whether this might happen, so that we can avoid normalizing away types with
jkinds that might get "better" later from with-bounds during jkind
normalization.
This commit adds a new "jkind_quality" type, and a "quality" field to jkind,
that tracks whether an inferred jkind is "best" or "not best", and sets this to
the correct value everywhere jkinds are constructed. Nothing actually /reads/
this field yet, but this will be used during normalization in a subsequent
commit.