Constraint over undetermined type parameters that keeps separate maps to reflect parameter orderings.
The weakest constraint that subsumes both this constraint and
A new constraint which is derived from this constraint by adding
entries for all type parameters of
A constraint that includes the relationship
p1 <: p2.
<: relationships between parameters ("edges") are propagated, but
non-parameter bounds are left alone.
Check that constraint only refers to TypeParamRefs bound by itself
Check that no constrained parameter contains itself as a bound
Does the constraint's domain contain the type parameters of
Does the constraint's domain contain the type parameter
Does this constraint contain the type variable
tvar and is it uninstantiated?
The list of parameters P such that, for a fresh type parameter Q:
Q <: tp implies Q <: P and isUpper = true, or tp <: Q implies P <: Q and isUpper = false
The type lambdas constrained by this constraint
The type lambda parameters constrained by this constraint
boundsMap entry corresponding to
lower(param) \ lower(butNot)
upper(param) \ upper(butNot)
Check whether predicate holds for all parameters in constraint
op on all typevars, or only on uninstantiated
typevars, depending on whether
uninstOnly is set or not.
The bounds of
param including all known-to-be-smaller and -greater parameters
The lower bound of
param including all known-to-be-smaller parameters
The upper bound of
param including all known-to-be-greater parameters
Split dependent parameters off the bounds for parameters in
Update all bounds to be normalized and update ordering to account for
Is it known that
param1 <:< param2?
Is entry associated with
pt removable? This is the case if
all type parameters of the entry are associated with type variables
which have their
inst fields set.
Constraint has not yet been retracted from a typer state
The parameters that are known to be smaller wrt <: than
Indicate that constraint has been retracted from a typer state
The constraint bounds for given type parameter
Poly params that are known to be smaller or greater than
are not contained in the return bounds.
The bound type
tp without clearly dependent parameters.
A top or bottom type if type consists only of dependent parameters.
Add the fact
param1 <: param2 to the constraint
current and propagate
<:< relationships between parameters ("edges") but not bounds.
The number of type parameters in the given entry array
A new constraint with all entries coming from
A new constraint which is derived from this constraint by removing
the type parameter
param from the domain and replacing all top-level occurrences
of the parameter elsewhere in the constraint by type
tp, or a conservative
approximation of it if that is needed to avoid cycles.
Occurrences nested inside a refinement or prefix are not affected.
The reason we need to substitute top-level occurrences of the parameter is to deal with situations like the following. Say we have in the constraint
P <: Q & String Q
and we replace Q with P. Then substitution gives
P <: P & String
this would be a cyclic constraint is therefore changed by
recombine below to
P <: String
approximating the RHS occurrence of P with Any. Without the substitution we would not find out where we need to approximate. Occurrences of parameters that are not top-level are not affected.
The bound type
tp without constrained parameters which are clearly
dependent. A parameter in an upper bound is clearly dependent if it appears
in a hole of a context H given by:
H =  H & T T & H
(the idea is that a parameter P in a H context is guaranteed to be a supertype of the bounded parameter.) Analogously, a parameter in a lower bound is clearly dependent if it appears in a hole of a context H given by:
L =  L | T T | L
"Clearly dependent" is not synonymous with "dependent" in the sense
it is defined in
dependentParams. Dependent parameters are handled
updateEntry. The idea of stripping off clearly dependent parameters
and to handle them separately is for efficiency, so that type expressions
used as bounds become smaller.
The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.
The type variable corresponding to parameter numbered
n, null if none was created
The type variable corresponding to parameter
param is not in constrained or is not paired with a type variable.
A constraint resulting from adding p2 = p1 to this constraint, and at the same time transferring all bounds of p2 to p1
The uninstantiated typevars of this constraint
A new constraint which is derived from this constraint by updating
the entry for parameter
tp can be one of the following:
- A TypeBounds value, indicating new constraint bounds
- Another type, indicating a solution for the parameter
The parameters that are known to be greater wrt <: than