aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Constraint.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-17 13:30:19 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commit70b3b90d686f3444e6b16cbf9deedc8aed0c62e8 (patch)
tree90521bcb625e2ec6d67ad0116e03d075f28ce704 /compiler/src/dotty/tools/dotc/core/Constraint.scala
parent2b5d1a80023f5676f5a97f0c56919c1f04f7ce2f (diff)
downloaddotty-70b3b90d686f3444e6b16cbf9deedc8aed0c62e8.tar.gz
dotty-70b3b90d686f3444e6b16cbf9deedc8aed0c62e8.tar.bz2
dotty-70b3b90d686f3444e6b16cbf9deedc8aed0c62e8.zip
Rename PolyParam --> TypeParamRef
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Constraint.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Constraint.scala42
1 files changed, 21 insertions, 21 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Constraint.scala b/compiler/src/dotty/tools/dotc/core/Constraint.scala
index 50136a26c..fe14aa53c 100644
--- a/compiler/src/dotty/tools/dotc/core/Constraint.scala
+++ b/compiler/src/dotty/tools/dotc/core/Constraint.scala
@@ -14,9 +14,9 @@ import config.Printers.constr
* over values of the following types:
*
* - PolyType A constraint constrains the type parameters of a set of PolyTypes
- * - PolyParam The parameters of the constrained polytypes
+ * - TypeParamRef The parameters of the constrained polytypes
* - TypeVar Every constrained parameter might be associated with a TypeVar
- * that has the PolyParam as origin.
+ * that has the TypeParamRef as origin.
*/
abstract class Constraint extends Showable {
@@ -26,7 +26,7 @@ abstract class Constraint extends Showable {
def contains(pt: PolyType): Boolean
/** Does the constraint's domain contain the type parameter `param`? */
- def contains(param: PolyParam): Boolean
+ def contains(param: TypeParamRef): Boolean
/** Does this constraint contain the type variable `tvar` and is it uninstantiated? */
def contains(tvar: TypeVar): Boolean
@@ -34,43 +34,43 @@ abstract class Constraint extends Showable {
/** The constraint entry for given type parameter `param`, or NoType if `param` is not part of
* the constraint domain. Note: Low level, implementation dependent.
*/
- def entry(param: PolyParam): Type
+ def entry(param: TypeParamRef): Type
/** The type variable corresponding to parameter `param`, or
* NoType, if `param` is not in constrained or is not paired with a type variable.
*/
- def typeVarOfParam(param: PolyParam): Type
+ def typeVarOfParam(param: TypeParamRef): Type
/** Is it known that `param1 <:< param2`? */
- def isLess(param1: PolyParam, param2: PolyParam): Boolean
+ def isLess(param1: TypeParamRef, param2: TypeParamRef): Boolean
/** The parameters that are known to be smaller wrt <: than `param` */
- def lower(param: PolyParam): List[PolyParam]
+ def lower(param: TypeParamRef): List[TypeParamRef]
/** The parameters that are known to be greater wrt <: than `param` */
- def upper(param: PolyParam): List[PolyParam]
+ def upper(param: TypeParamRef): List[TypeParamRef]
/** lower(param) \ lower(butNot) */
- def exclusiveLower(param: PolyParam, butNot: PolyParam): List[PolyParam]
+ def exclusiveLower(param: TypeParamRef, butNot: TypeParamRef): List[TypeParamRef]
/** upper(param) \ upper(butNot) */
- def exclusiveUpper(param: PolyParam, butNot: PolyParam): List[PolyParam]
+ def exclusiveUpper(param: TypeParamRef, butNot: TypeParamRef): List[TypeParamRef]
/** The constraint bounds for given type parameter `param`.
* Poly params that are known to be smaller or greater than `param`
* are not contained in the return bounds.
* @pre `param` is not part of the constraint domain.
*/
- def nonParamBounds(param: PolyParam): TypeBounds
+ def nonParamBounds(param: TypeParamRef): TypeBounds
/** The lower bound of `param` including all known-to-be-smaller parameters */
- def fullLowerBound(param: PolyParam)(implicit ctx: Context): Type
+ def fullLowerBound(param: TypeParamRef)(implicit ctx: Context): Type
/** The upper bound of `param` including all known-to-be-greater parameters */
- def fullUpperBound(param: PolyParam)(implicit ctx: Context): Type
+ def fullUpperBound(param: TypeParamRef)(implicit ctx: Context): Type
/** The bounds of `param` including all known-to-be-smaller and -greater parameters */
- def fullBounds(param: PolyParam)(implicit ctx: Context): TypeBounds
+ def fullBounds(param: TypeParamRef)(implicit ctx: Context): TypeBounds
/** A new constraint which is derived from this constraint by adding
* entries for all type parameters of `poly`.
@@ -90,18 +90,18 @@ abstract class Constraint extends Showable {
*
* @pre `this contains param`.
*/
- def updateEntry(param: PolyParam, tp: Type)(implicit ctx: Context): This
+ def updateEntry(param: TypeParamRef, tp: Type)(implicit ctx: Context): This
/** A constraint that includes the relationship `p1 <: p2`.
* `<:` relationships between parameters ("edges") are propagated, but
* non-parameter bounds are left alone.
*/
- def addLess(p1: PolyParam, p2: PolyParam)(implicit ctx: Context): This
+ def addLess(p1: TypeParamRef, p2: TypeParamRef)(implicit ctx: Context): This
/** A constraint resulting from adding p2 = p1 to this constraint, and at the same
* time transferring all bounds of p2 to p1
*/
- def unify(p1: PolyParam, p2: PolyParam)(implicit ctx: Context): This
+ def unify(p1: TypeParamRef, p2: TypeParamRef)(implicit ctx: Context): This
/** A new constraint which is derived from this constraint by removing
* the type parameter `param` from the domain and replacing all top-level occurrences
@@ -109,7 +109,7 @@ abstract class Constraint extends Showable {
* approximation of it if that is needed to avoid cycles.
* Occurrences nested inside a refinement or prefix are not affected.
*/
- def replace(param: PolyParam, tp: Type)(implicit ctx: Context): This
+ def replace(param: TypeParamRef, tp: Type)(implicit ctx: Context): This
/** Is entry associated with `pt` removable? This is the case if
* all type parameters of the entry are associated with type variables
@@ -124,10 +124,10 @@ abstract class Constraint extends Showable {
def domainPolys: List[PolyType]
/** The polytype parameters constrained by this constraint */
- def domainParams: List[PolyParam]
+ def domainParams: List[TypeParamRef]
/** Check whether predicate holds for all parameters in constraint */
- def forallParams(p: PolyParam => Boolean): Boolean
+ def forallParams(p: TypeParamRef => Boolean): Boolean
/** Perform operation `op` on all typevars, or only on uninstantiated
* typevars, depending on whether `uninstOnly` is set or not.
@@ -143,6 +143,6 @@ abstract class Constraint extends Showable {
/** Check that no constrained parameter contains itself as a bound */
def checkNonCyclic()(implicit ctx: Context): Unit
- /** Check that constraint only refers to PolyParams bound by itself */
+ /** Check that constraint only refers to TypeParamRefs bound by itself */
def checkClosed()(implicit ctx: Context): Unit
}