Rework jkind default#2158
Conversation
ae288cf to
b056c36
Compare
|
This follows #2107 and reworks how type variables get their jkinds. Prior to #2107, type variables start with jkind #2107 passes the tests by changing type variables to all start with concrete jkinds. This PR makes the type variable jkind initialization controllable through a new field in The general rule it follows is that
This PR also contains a change to How to reviewMight be best to first review the changes in |
goldfirere
left a comment
There was a problem hiding this comment.
A few changes requested on choices of policy.
I did not review testsuite changes, as I wish to review them in #2107.
* extend policy to control ty var jkind init * annotation on type vars should be upper bounds * proper jkind reason * sort init rhs of constraints for backward compatibility * add comment&rename to jkind_initialization_choice * refactor policy * comment about transl_simple_type_delayed * use Any more in typeclass * add new_var_jkind param and thread it through * use Any for with constraint * add note * more tests * more tests
* wip * change Wildcard and Unification_var to sort vars * test changes * more tests * fix test * test changes * Rework jkind default (#2158) * extend policy to control ty var jkind init * annotation on type vars should be upper bounds * proper jkind reason * sort init rhs of constraints for backward compatibility * add comment&rename to jkind_initialization_choice * refactor policy * comment about transl_simple_type_delayed * use Any more in typeclass * add new_var_jkind param and thread it through * use Any for with constraint * add note * more tests * more tests * rebase over type var print order change * Add a bunch of tests * check instead of constrain * jkind check in unify_univar * update test outputs * change unify_univar to take jkinds * Testing representability of function argument * More tests * Yet more tests * Accept test output * Propagate new test to _alpha * More tests, this time about inference * add tests to _alpha * small test changes * relax approx_type * reword history message * add cr for bad error message * fix test * rename layout to jkind * add comments about check_type_jkind_exn * add comment about unify_univar invariant --------- Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
* wip * change Wildcard and Unification_var to sort vars * test changes * more tests * fix test * test changes * Rework jkind default (oxcaml#2158) * extend policy to control ty var jkind init * annotation on type vars should be upper bounds * proper jkind reason * sort init rhs of constraints for backward compatibility * add comment&rename to jkind_initialization_choice * refactor policy * comment about transl_simple_type_delayed * use Any more in typeclass * add new_var_jkind param and thread it through * use Any for with constraint * add note * more tests * more tests * rebase over type var print order change * Add a bunch of tests * check instead of constrain * jkind check in unify_univar * update test outputs * change unify_univar to take jkinds * Testing representability of function argument * More tests * Yet more tests * Accept test output * Propagate new test to _alpha * More tests, this time about inference * add tests to _alpha * small test changes * relax approx_type * reword history message * add cr for bad error message * fix test * rename layout to jkind * add comments about check_type_jkind_exn * add comment about unify_univar invariant --------- Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
No description provided.