diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-17 14:02:29 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:28 +0200 |
commit | 78e6cc748b4dcde30bdac3618c4804ff65f32e45 (patch) | |
tree | 1786347de0ecfc4e841a6a873c704739dadfc2e5 /compiler/src/dotty/tools/dotc/core/Constraint.scala | |
parent | 70b3b90d686f3444e6b16cbf9deedc8aed0c62e8 (diff) | |
download | dotty-78e6cc748b4dcde30bdac3618c4804ff65f32e45.tar.gz dotty-78e6cc748b4dcde30bdac3618c4804ff65f32e45.tar.bz2 dotty-78e6cc748b4dcde30bdac3618c4804ff65f32e45.zip |
Make PolyTypes subtypes of LambdaTypes
Also, rename LambdaOver{Type,Term}s to {Type,Term}Lambda
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Constraint.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Constraint.scala | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Constraint.scala b/compiler/src/dotty/tools/dotc/core/Constraint.scala index fe14aa53c..7a0e6dece 100644 --- a/compiler/src/dotty/tools/dotc/core/Constraint.scala +++ b/compiler/src/dotty/tools/dotc/core/Constraint.scala @@ -13,17 +13,17 @@ import config.Printers.constr /** Constraint over undetermined type parameters. Constraints are built * over values of the following types: * - * - PolyType A constraint constrains the type parameters of a set of PolyTypes - * - TypeParamRef The parameters of the constrained polytypes - * - TypeVar Every constrained parameter might be associated with a TypeVar - * that has the TypeParamRef as origin. + * - TypeLambda A constraint constrains the type parameters of a set of TypeLambdas + * - TypeParamRef The parameters of the constrained polytypes + * - TypeVar Every constrained parameter might be associated with a TypeVar + * that has the TypeParamRef as origin. */ abstract class Constraint extends Showable { type This <: Constraint /** Does the constraint's domain contain the type parameters of `pt`? */ - def contains(pt: PolyType): Boolean + def contains(pt: TypeLambda): Boolean /** Does the constraint's domain contain the type parameter `param`? */ def contains(param: TypeParamRef): Boolean @@ -79,7 +79,7 @@ abstract class Constraint extends Showable { * satisfiability but will solved to give instances of * type variables. */ - def add(poly: PolyType, tvars: List[TypeVar])(implicit ctx: Context): This + def add(poly: TypeLambda, tvars: List[TypeVar])(implicit ctx: Context): This /** A new constraint which is derived from this constraint by updating * the entry for parameter `param` to `tp`. @@ -115,13 +115,13 @@ abstract class Constraint extends Showable { * all type parameters of the entry are associated with type variables * which have their `inst` fields set. */ - def isRemovable(pt: PolyType): Boolean + def isRemovable(pt: TypeLambda): Boolean /** A new constraint with all entries coming from `pt` removed. */ - def remove(pt: PolyType)(implicit ctx: Context): This + def remove(pt: TypeLambda)(implicit ctx: Context): This /** The polytypes constrained by this constraint */ - def domainPolys: List[PolyType] + def domainPolys: List[TypeLambda] /** The polytype parameters constrained by this constraint */ def domainParams: List[TypeParamRef] |