Skip to main content

Module terms

Module terms 

Source
Expand description

Implement object-level subtyping.

Functionsยง

generalize ๐Ÿ”’
Generalize returns a new red-ty created by replacing any generic arguments in red_ty with fresh inference variables.
propagate_inverse_bound ๐Ÿ”’
What each upper or lower (depending on direction) bound B that is added to infer and add a lower or upper (respectively) bound B1 that is implied by B.
reconcile_ty_bounds
A task that runs for each type inference variable. It awaits any upper/lower bounds and propagates a corresponding bound.
require_assignable_type
require_infer_has_bound ๐Ÿ”’
Return the upper or lower (depending on direction) red-ty-bound from infer. If infer does not yet have a suitable bound, create one by generalizing bound.
require_infer_sub_infer ๐Ÿ”’
Require that lower <: upper, where both are type inference variables. This will insert record upper as an upper bound of lower. If upper is a new upper bound, it will begin looping, taking each lower bound of lower and propagating it to upper (in this case it will not return).
require_infer_sub_ty ๐Ÿ”’
Return the red-ty lower bound from infer, creating one if needed by generalizing bound. Does not relate the return value and bound in any other way.
require_sub_red_terms
require_sub_terms
require_ty_sub_infer ๐Ÿ”’
Relate lower_term (not)