TopLevelMatchQualityService

class Object
trait Matchable
class Any

Type members

Inherited classlikes

implicit implicit class TypeMatchingOps(typ: TypeLike)
Inherited from:
MatchingOps
implicit implicit class TypeVariancesOps(types: Seq[TypeLike])
Inherited from:
MatchingOps

Value members

Concrete methods

def isGeneralised(typ: TypeLike): Boolean
def matchQualityMetric(AnnotatedSignature: AnnotatedSignature, matching: Signature): Int

Returns match quality metric for two typelikes the lower the metric value, the better the match

Returns match quality metric for two typelikes the lower the metric value, the better the match

def varianceMatchQualityMetric(typVariance: Variance, suprVariance: Variance): Int
def variancesMatchQualityMetric(typVariances: Seq[Variance], suprVariances: Seq[Variance]): Int

Inherited methods

def dealias(concreteType: Type, node: TypeLike): Option[TypeLike]
Inherited from:
MatchingOps
protected def genDummyTypes(n: Int): IndexedSeq[Type]
Inherited from:
MatchingOps
def sortMatches(functions: Seq[(AnnotatedSignature, Signature)]): Seq[(AnnotatedSignature, Int)]
def specializeParents(concreteType: Type, node: (Type, Seq[TypeLike])): Seq[TypeLike]
Inherited from:
MatchingOps
def substituteBindings(parent: TypeLike, bindings: Map[ITID, TypeLike]): TypeLike
Inherited from:
MatchingOps

Concrete fields

final val aLotCost: 1000000

Matching constants

Matching constants

final val andOrOrTypeCost: 50
final val avoidThose: Set[TypeName]

Classes thet generally mean loss of some information

Classes thet generally mean loss of some information

final val concreteToVarCost: 5000
final val dealiasCost: 10
final val equalCost: 1
final val losingInformationCost: 10000
final val subTypeCost: 100
final val typeLambdaCost: 1
final val varToConcreteCost: 200
final val varToVarCost: 1

Implicits

Inherited implicits

final implicit def TypeMatchingOps(typ: TypeLike): TypeMatchingOps
Inherited from:
MatchingOps
final implicit def TypeVariancesOps(types: Seq[TypeLike]): TypeVariancesOps
Inherited from:
MatchingOps